Instructions to use tchbcb/samai-8b-M8 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 tchbcb/samai-8b-M8 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 tchbcb/samai-8b-M8:Q4_K_M # Run inference directly in the terminal: llama cli -hf tchbcb/samai-8b-M8:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf tchbcb/samai-8b-M8:Q4_K_M # Run inference directly in the terminal: llama cli -hf tchbcb/samai-8b-M8:Q4_K_M
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 tchbcb/samai-8b-M8:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf tchbcb/samai-8b-M8:Q4_K_M
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 tchbcb/samai-8b-M8:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf tchbcb/samai-8b-M8:Q4_K_M
Use Docker
docker model run hf.co/tchbcb/samai-8b-M8:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use tchbcb/samai-8b-M8 with Ollama:
ollama run hf.co/tchbcb/samai-8b-M8:Q4_K_M
- Unsloth Desktop
- Pi
How to use tchbcb/samai-8b-M8 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf tchbcb/samai-8b-M8:Q4_K_M
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": "tchbcb/samai-8b-M8:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use tchbcb/samai-8b-M8 with Docker Model Runner:
docker model run hf.co/tchbcb/samai-8b-M8:Q4_K_M
- Lemonade
How to use tchbcb/samai-8b-M8 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tchbcb/samai-8b-M8:Q4_K_M
Run and chat with the model
lemonade run user.samai-8b-M8-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use tchbcb/samai-8b-M8 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf tchbcb/samai-8b-M8:Q4_K_M
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 tchbcb/samai-8b-M8:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use tchbcb/samai-8b-M8 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf tchbcb/samai-8b-M8:Q4_K_M
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 "tchbcb/samai-8b-M8:Q4_K_M" \ --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"
samai-8b — M8 终版权重 (GGUF)
samai-8b 是基于 Qwen/Qwen3.5-9B(bf16)持续蒸馏增强的对话/执行模型。本仓库交付 M8「agent 执行能力增强」轮的最终 q4_k_m 量化权重,为系列工作的终版交付。
评测结果
| 评测集 | M7 基线 | M8 终版 | 提升 |
|---|---|---|---|
| agent60 A 单跳 | 100.0 | 100.0 | — |
| agent60 B 多工具 | 73.3 | 100.0 | +26.7 |
| agent60 C 多轮链式 | 100.0 | 93.3 | -6.7 |
| agent60 D 负向直答 | 80.0 | 93.3 | +13.3 |
| agent60 总分 | 86.7 | 96.7 | +10.0 |
| knight15 能力回归 | 15/15 | 15/15 | 零回退 |
定靶命中:多工具编排(B +26.7)与负向拒答直答(D +13.3)双双显著提升;knight15 满分确认核心能力零回退。
文件
| 文件 | 大小 | sha256 |
|---|---|---|
samai8b_m8_q4_k_m.gguf |
5.78 GB (5,780,090,720 B) | 9566d8a7d85782b2284ee970d82306dfd33fb52df4b35e42a722a3d63c94f818 |
溯源与训练配方
- 基座:
Qwen/Qwen3.5-9Bbf16,逐对校验流式合并 LoRA(128/128 lora pairs 全命中) - 训练:QLoRA(nf4, r=32, α=64),教师即程序范式合成的四簇 agent 指令数据(单跳/多工具/多轮链式/负向直答,共 3200 条,含工具可达性红线校验与真答案负样本)
- 量化链:合并 bf16 →
convert_hf_to_gguf.pyf16 →llama-quantizeq4_k_m - 评测:60 题 agent 评测(T4 真机)+ knight15 能力回归门,报告见
m8_final_report.json/m8_knight15_report.json/m8_baseline_report.json
用法 (llama.cpp)
llama-server -m samai8b_m8_q4_k_m.gguf -ngl 99 -c 2048 --port 8080
q4_k_m 在 T4 (SM75) 上验证通过;CPU 模式真推理冒烟亦通过。
PK: samai-8b M8 vs Ternary-Bonsai-2-27B (prism-ml)
同盘位对决 (q4_k_m 5.78G vs PTQ1_0 5.95G), 全新 48 题 agent 任务银行 (零训练泄漏, 四簇: 单跳/多工具/多轮链式/负向直答), 同 harness / 同构 server 配置 / greedy 判分:
| 簇 | samai-8b M8 | Bonsai-2-27B | delta |
|---|---|---|---|
| A 单跳 | 58.3% | 58.3% | 0 |
| B 多工具 | 50.0% | 41.7% | +8.3 |
| C 多轮链式 | 41.7% | 41.7% | 0 |
| D 负向直答 | 100.0% | 100.0% | 0 |
| 总分 | 62.5% | 60.4% | +2.1 |
裁决: M8 胜出 — 以 9B/5.78G 打平并在总分与逐题 head-to-head (1 胜 0 负) 上压过 27B/5.95G 的 ternary 同级对手, 多工具编排是决胜簇。逐题明细见 pk_summary.json, 题库见 m8_pk_eval.jsonl。
- Downloads last month
- 6,662
4-bit