Instructions to use yuhuanstudio/Yunmo-Next-1B-Instruct-bnb-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yuhuanstudio/Yunmo-Next-1B-Instruct-bnb-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yuhuanstudio/Yunmo-Next-1B-Instruct-bnb-4bit", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("yuhuanstudio/Yunmo-Next-1B-Instruct-bnb-4bit", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yuhuanstudio/Yunmo-Next-1B-Instruct-bnb-4bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yuhuanstudio/Yunmo-Next-1B-Instruct-bnb-4bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yuhuanstudio/Yunmo-Next-1B-Instruct-bnb-4bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/yuhuanstudio/Yunmo-Next-1B-Instruct-bnb-4bit
- SGLang
How to use yuhuanstudio/Yunmo-Next-1B-Instruct-bnb-4bit with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "yuhuanstudio/Yunmo-Next-1B-Instruct-bnb-4bit" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yuhuanstudio/Yunmo-Next-1B-Instruct-bnb-4bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "yuhuanstudio/Yunmo-Next-1B-Instruct-bnb-4bit" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yuhuanstudio/Yunmo-Next-1B-Instruct-bnb-4bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use yuhuanstudio/Yunmo-Next-1B-Instruct-bnb-4bit with Docker Model Runner:
docker model run hf.co/yuhuanstudio/Yunmo-Next-1B-Instruct-bnb-4bit
Yunmo-Next-1B-Instruct-bnb-4bit
bnb-4bit version of Yunmo-Next-1B-Instruct, a 1.0B-parameter Traditional-Chinese-first model with a hybrid Kimi Delta Attention / grouped-query attention architecture, pretrained from scratch on 19.76B tokens and then instruction-tuned. This card covers the quantized weights; the model, its training, evaluation and limitations are described in the full-precision repository, Yunmo-Next-1B-Instruct.
Research checkpoint. The model is at chance on knowledge multiple choice, often wrong on facts, sometimes repeats itself until the token limit, and has no safety tuning. Read the Limitations of the full-precision card before use.
Quantization
| Format | NF4 weights with double quantization, BF16 compute |
| Library | bitsandbytes |
| Quantized layers | 645 of 645 linear layers |
| Kept in BF16 | tied embedding / output layer, norms, convolutions, router |
| Source | yuhuanstudio/Yunmo-Next-1B-Instruct, revision recorded in quantization-report.json |
Quality and speed
Bits per byte on 3,754 Chinese Wikipedia articles created after 2026-10-01 (first 2,000 characters each; independent of the tokenizer). Decode latency per token at 1,024 tokens of context, batch 1, on an RTX 4070 Ti, with the bundled CUDA-graph decoder where the format supports it (bitsandbytes runs the eager loop). The BF16 latency was measured on the Base model, which has the same architecture and size.
| Weights | Repository | Weights in GPU memory | Bits per byte ↓ | Δ vs BF16 | ms / token |
|---|---|---|---|---|---|
| BF16 | Yunmo-Next-1B-Instruct | 2.02 GB | 0.9302 | — | 11.2 |
| INT8 | Yunmo-Next-1B-Instruct-INT8 | 1.08 GB | 0.9304 | +0.0002 | 13.6 |
| FP8 | Yunmo-Next-1B-Instruct-FP8 | 1.08 GB | 0.9313 | +0.0011 | 16.2 |
| NVFP4 | Yunmo-Next-1B-Instruct-NVFP4 | 0.67 GB | 0.9397 | +0.0095 | 107.8 |
| bnb-4bit | Yunmo-Next-1B-Instruct-bnb-4bit | 0.62 GB | 0.9390 | +0.0088 | 138.8 |
On this GPU every quantized format decodes more slowly than BF16 (this one: 138.8 ms per token); use it to save memory, not for speed.
Hardware: Any NVIDIA GPU supported by bitsandbytes and flash-linear-attention.
Usage
pip install "transformers>=5.14,<6" "flash-linear-attention==0.5.2" bitsandbytes accelerate
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "yuhuanstudio/Yunmo-Next-1B-Instruct-bnb-4bit"
tokenizer = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, device_map="cuda:0").eval()
messages = [{"role": "user", "content": "請用三句話介紹玉山。"}]
ids = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt",
return_dict=True)["input_ids"].cuda()
stop = tokenizer.convert_tokens_to_ids("<|return|>")
out = model.generate(ids, max_new_tokens=256, stop_token_ids=(stop,))
print(tokenizer.decode(out[0, ids.shape[1]:], skip_special_tokens=True))
The repository includes the model code (trust_remote_code), the tokenizer and the chat template of the
full-precision model.
License
Apache-2.0, as for Yunmo-Next-1B-Instruct. The weights are released under Apache-2.0, but some fine-tuning sources state their own conditions (AM-Thinking-v1 and AM-DeepSeek-R1 distillations: research use only; tw-instruct-500k: CC BY-NC-SA 4.0; no_robots: CC BY-NC 4.0; some subsets of the FABLE.5 traces: AGPL-3.0). See the Data and License sections of Yunmo-Next-1B-Instruct before commercial use. Evaluation details: evaluation report.
- Downloads last month
- 31
Model tree for yuhuanstudio/Yunmo-Next-1B-Instruct-bnb-4bit
Base model
yuhuanstudio/Yunmo-Next-1B-Base