Instructions to use 42ailab/Intern-S2-397B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use 42ailab/Intern-S2-397B-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf 42ailab/Intern-S2-397B-GGUF:IQ1_S # Run inference directly in the terminal: llama cli -hf 42ailab/Intern-S2-397B-GGUF:IQ1_S
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf 42ailab/Intern-S2-397B-GGUF:IQ1_S # Run inference directly in the terminal: llama cli -hf 42ailab/Intern-S2-397B-GGUF:IQ1_S
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 42ailab/Intern-S2-397B-GGUF:IQ1_S # Run inference directly in the terminal: ./llama-cli -hf 42ailab/Intern-S2-397B-GGUF:IQ1_S
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 42ailab/Intern-S2-397B-GGUF:IQ1_S # Run inference directly in the terminal: ./build/bin/llama-cli -hf 42ailab/Intern-S2-397B-GGUF:IQ1_S
Use Docker
docker model run hf.co/42ailab/Intern-S2-397B-GGUF:IQ1_S
- LM Studio
- Jan
- vLLM
How to use 42ailab/Intern-S2-397B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "42ailab/Intern-S2-397B-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": "42ailab/Intern-S2-397B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/42ailab/Intern-S2-397B-GGUF:IQ1_S
- Ollama
How to use 42ailab/Intern-S2-397B-GGUF with Ollama:
ollama run hf.co/42ailab/Intern-S2-397B-GGUF:IQ1_S
- Unsloth Desktop
- Pi
How to use 42ailab/Intern-S2-397B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf 42ailab/Intern-S2-397B-GGUF:IQ1_S
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "42ailab/Intern-S2-397B-GGUF:IQ1_S" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use 42ailab/Intern-S2-397B-GGUF with Docker Model Runner:
docker model run hf.co/42ailab/Intern-S2-397B-GGUF:IQ1_S
- Lemonade
How to use 42ailab/Intern-S2-397B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull 42ailab/Intern-S2-397B-GGUF:IQ1_S
Run and chat with the model
lemonade run user.Intern-S2-397B-GGUF-IQ1_S
List all available models
lemonade list
- Hermes Agent
How to use 42ailab/Intern-S2-397B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf 42ailab/Intern-S2-397B-GGUF:IQ1_S
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 42ailab/Intern-S2-397B-GGUF:IQ1_S
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use 42ailab/Intern-S2-397B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf 42ailab/Intern-S2-397B-GGUF:IQ1_S
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "42ailab/Intern-S2-397B-GGUF:IQ1_S" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Intern-S2-397B · A Science Model That Runs on One 128 GB Machine
English | 简体中文 · Also on ModelScope · 42ailab.com
A science model of nearly 400 billion parameters, compressed to about 98 GB so that it runs offline on a single computer with 128 GB of memory: read papers, check derivations, write research code, run long research tasks. Nothing leaves your machine.
The model was built by Shanghai AI Laboratory (InternLM team) and released under Apache-2.0 (Intern-S2-397B). This repository is not a new model: it is a quantized GGUF we made from the official weights, plus our own test results. The capability belongs upstream.
What it is for
Upstream describes Intern-S2-397B as its most capable model for scientific intelligence and long-horizon agents, trained with large-scale reinforcement learning across more than 20 scientific domains. The official weights are about 800 GB in full precision (about 400 GB in the official 8-bit release), which normally means a multi-GPU server.
This build is about 98 GB, so a Mac or PC with 128 GB of memory can run it locally.
How we compressed it
We started from the official 8-bit release and brought it down to about 1.95 bits per weight on average. What matters is where the bits go, not how hard everything is squeezed:
- The model is a mixture of experts: 512 expert blocks, of which 10 are used per token. The experts are about 90% of the size, so only they get extreme compression.
- Attention and the other small but quality-sensitive parts stay at 8-bit.
We also tried the common approach of pushing every part to about 1 bit: the model fell into repetition and nonsense. With the allocation above, the same four test prompts were answered normally.
What we measured
For the model's benchmark results, see the upstream model card. The numbers below are our own checks on an Apple M3 Max with 128 GB:
| Check | Result |
|---|---|
| On Chinese technical text the model had not seen, how often its top prediction matches the 8-bit version | 81% of positions |
| Perplexity on the same text, relative to the 8-bit version (lower is better) | about 9% higher |
| Four prompts (Chinese explanation, Chinese writing, a time calculation, Python) | all answered normally; the calculation and the code were correct |
| Generation speed (GPU) | about 6–15 tokens per second |
These are small samples (one run per prompt), not official benchmark scores.
Limitations
- Needs 128 GB of memory. The files are about 98 GB, and running needs more on top.
- Text only. The upstream model also reads images; this build does not include the vision part.
- Thinks at length first. Upstream enables thinking by default, so answers are preceded by a long reasoning trace; you can turn thinking off for simple questions.
- Extreme compression costs something. About 1 in 5 top predictions differ from the 8-bit version. Where precision matters most, use the official weights.
Use
Packaged for 42model: in the desktop app, open Models → Research and download Intern-S2-397B; or run 42model download intern-s2:397b-iq1_s.
Files and license
| File | Role | Size |
|---|---|---|
Intern-S2-397B-IQ1_S-mix-00001-of-00003.gguf and 2 more |
the model, split to fit the per-file size limit (loaded together automatically) | 91.4 GiB total |
Weights are under the upstream Apache-2.0 license (official weights). Upstream does not give a citation for this model; its predecessor's technical report is Intern-S2-Preview (arXiv:2608.13505), which describes the Preview release, not this one.
- Downloads last month
- 175
1-bit
Model tree for 42ailab/Intern-S2-397B-GGUF
Base model
internlm/Intern-S2-397B