Instructions to use internlm/Intern-S1-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use internlm/Intern-S1-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="internlm/Intern-S1-GGUF", filename="Q8_0/Intern-S1-Q8_0-00001-of-00009.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use internlm/Intern-S1-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf internlm/Intern-S1-GGUF:Q8_0 # Run inference directly in the terminal: llama-cli -hf internlm/Intern-S1-GGUF:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf internlm/Intern-S1-GGUF:Q8_0 # Run inference directly in the terminal: llama-cli -hf internlm/Intern-S1-GGUF:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf internlm/Intern-S1-GGUF:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf internlm/Intern-S1-GGUF:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf internlm/Intern-S1-GGUF:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf internlm/Intern-S1-GGUF:Q8_0
Use Docker
docker model run hf.co/internlm/Intern-S1-GGUF:Q8_0
- LM Studio
- Jan
- vLLM
How to use internlm/Intern-S1-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "internlm/Intern-S1-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "internlm/Intern-S1-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/internlm/Intern-S1-GGUF:Q8_0
- Ollama
How to use internlm/Intern-S1-GGUF with Ollama:
ollama run hf.co/internlm/Intern-S1-GGUF:Q8_0
- Unsloth Studio new
How to use internlm/Intern-S1-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for internlm/Intern-S1-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for internlm/Intern-S1-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for internlm/Intern-S1-GGUF to start chatting
- Pi new
How to use internlm/Intern-S1-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf internlm/Intern-S1-GGUF:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "internlm/Intern-S1-GGUF:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use internlm/Intern-S1-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf internlm/Intern-S1-GGUF:Q8_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default internlm/Intern-S1-GGUF:Q8_0
Run Hermes
hermes
- Docker Model Runner
How to use internlm/Intern-S1-GGUF with Docker Model Runner:
docker model run hf.co/internlm/Intern-S1-GGUF:Q8_0
- Lemonade
How to use internlm/Intern-S1-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull internlm/Intern-S1-GGUF:Q8_0
Run and chat with the model
lemonade run user.Intern-S1-GGUF-Q8_0
List all available models
lemonade list
Intern-S1-GGUF Model
👋 join us on Discord and WeChat
Introduction
The Intern-S1 model in GGUF format can be utilized by llama.cpp, a highly popular open-source framework for Large Language Model (LLM) inference, across a variety of hardware platforms, both locally and in the cloud.
This repository offers Intern-S1 models in GGUF format in both half precision and various low-bit quantized versions, including q8_0.
In the subsequent sections, we will first present the installation procedure, followed by an explanation of the model download process. And finally we will illustrate the methods for model inference and service deployment through specific examples.
Installation
We recommend building llama.cpp from source. The following code snippet provides an example for the Linux CUDA platform. For instructions on other platforms, please refer to the official guide.
- Step 1: create a conda environment and install cmake
conda create --name interns1 python=3.10 -y
conda activate interns1
pip install cmake
- Step 2: clone the source code and build the project
git clone --depth=1 https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build -DGGML_CUDA=ON
cmake --build build --config Release -j
All the built targets can be found in the sub directory build/bin
In the following sections, we assume that the working directory is at the root directory of llama.cpp.
Download models
In the introduction section, we mentioned that this repository includes several models with varying levels of computational precision. You can download the appropriate model based on your requirements. For instance, fp16 gguf files can be downloaded as below:
pip install huggingface-hub
huggingface-cli download internlm/Intern-S1-GGUF --include *-f16-*.gguf --local-dir Intern-S1-GGUF --local-dir-use-symlinks False
Merge model files
Run the following command to merge gguf files into one:
build/bin/llama-gguf-split \
--merge \
Intern-S1-GGUF/f16/Intern-S1-f16-00001-of-00016.gguf \
Intern-S1-GGUF/f16/Intern-S1-f16.gguf
Inference
You can use build/bin/llama-mtmd-cli for conducting inference. For a detailed explanation of build/bin/llama-mtmd-cli, please refer to this guide
chat example
Here is an example of using the thinking system prompt.
system_prompt="<|im_start|>system\nYou are an expert reasoner with extensive experience in all areas. You approach problems through systematic thinking and rigorous reasoning. Your response should reflect deep understanding and precise logical thinking, making your solution path and reasoning clear to others. Please put your thinking process within <think>...</think> tags.\n<|im_end|>\n"
build/bin/llama-mtmd-cli \
--model Intern-S1-GGUF/f16/Intern-S1-f16.gguf \
--mmproj Intern-S1-GGUF/f16/mmproj-Intern-S1-f16.gguf \
--predict 2048 \
--ctx-size 8192 \
--gpu-layers 100 \
--temp 0.8 \
--top-p 0.8 \
--top-k 50 \
--seed 1024
Then input your question with image input as /image xxx.jpg.
Serving
llama.cpp provides an OpenAI API compatible server - llama-server. You can deploy the model as a service like this:
./build/bin/llama-server \
--model Intern-S1-GGUF/f16/Intern-S1-f16.gguf \
--mmproj Intern-S1-GGUF/f16/mmproj-Intern-S1-f16.gguf \
--gpu-layers 100 \
--temp 0.8 \
--top-p 0.8 \
--top-k 50 \
--port 8080 \
--seed 1024
At the client side, you can access the service through OpenAI API:
from openai import OpenAI
client = OpenAI(
api_key='YOUR_API_KEY',
base_url='http://localhost:8080/v1'
)
model_name = client.models.list().data[0].id
response = client.chat.completions.create(
model=model_name,
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": " provide three suggestions about time management"},
],
temperature=0.8,
top_p=0.8
)
print(response)
Ollama
# install ollama
curl -fsSL https://ollama.com/install.sh | sh
# fetch model
ollama pull internlm/interns1
# run model
ollama run internlm/interns1
# then use openai client to call on http://localhost:11434/v1
- Downloads last month
- 24
8-bit
16-bit
Model tree for internlm/Intern-S1-GGUF
Base model
internlm/Intern-S1