Instructions to use issai/foggen-qwen3-1.7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use issai/foggen-qwen3-1.7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="issai/foggen-qwen3-1.7b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("issai/foggen-qwen3-1.7b") model = AutoModelForCausalLM.from_pretrained("issai/foggen-qwen3-1.7b") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use issai/foggen-qwen3-1.7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "issai/foggen-qwen3-1.7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "issai/foggen-qwen3-1.7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/issai/foggen-qwen3-1.7b
- SGLang
How to use issai/foggen-qwen3-1.7b 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 "issai/foggen-qwen3-1.7b" \ --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": "issai/foggen-qwen3-1.7b", "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 "issai/foggen-qwen3-1.7b" \ --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": "issai/foggen-qwen3-1.7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use issai/foggen-qwen3-1.7b with Docker Model Runner:
docker model run hf.co/issai/foggen-qwen3-1.7b
FogGen (Qwen3-1.7B): cross-scale R14 endpoint
The 1.7B-parameter scale-up of issai/foggen. Same 14-round self-evolving recipe, same cloud teacher, same seven MCQ domains; the edge backbone is the only change.
This checkpoint exists to test whether the FogGen recipe transfers across model size. The canonical 0.6B endpoint lives at issai/foggen and is the deployment model. This 1.7B variant trades cost for raw and system accuracy: same recipe, larger backbone, ~3× the per-query compute.
For background on the system overview, training pipeline, and routing protocol, see the issai/foggen model card; only the differences are documented here.
Recipe
Everything is held identical to issai/foggen:
- Cloud teacher: Qwen3-30B-A3B-Instruct-2507
- 7 domain rotation: finance, science, coding, law, math, Kazakh culture, medical
- 14 sequential SFT rounds (R0 → R14)
- LoRA r=16, α=32, all-linear, bf16, 2 epochs, lr=5e-5
- Same confidence buckets (
0.0, 0.25, 0.5, 0.75, 1.0) and same FogGen output format - For R0 the 1,800-question calibration buffer is re-labeled from scratch with the raw Qwen3-1.7B base (N=8 at T=0.7)
The only change is the edge backbone (Qwen/Qwen3-1.7B in place of Qwen/Qwen3-0.6B).
Performance
System accuracy at τ=0.5 on the seven MCQ domains (full test sets, ~16,200 queries). Cloud baseline is Qwen3-30B-A3B-Instruct-2507.
| Domain | Cloud only | R14 raw | Random @ τ=0.5 | FogGen @ τ=0.5 | Cloud routed |
|---|---|---|---|---|---|
| Finance | 69.5% | 66.0% | 66.7% | 71.0% | 20.1% |
| Science | 72.7% | 64.0% | 66.1% | 70.7% | 23.2% |
| Coding | 74.2% | 68.9% | 69.9% | 73.7% | 18.3% |
| Law | 70.7% | 62.1% | 64.7% | 69.5% | 29.8% |
| Math | 60.1% | 47.2% | 51.8% | 56.7% | 35.6% |
| Kazakh culture | 95.8% | 90.7% | 91.1% | 92.5% | 8.2% |
| Medical | 74.0% | 62.0% | 65.7% | 72.1% | 30.9% |
| Mean | 73.9% | 65.8% | 68.0% | 72.3% | 23.7% |
Mean lift over Random at τ=0.5: +4.3.
Quick demo
from transformers import AutoTokenizer, AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("issai/foggen-qwen3-1.7b", torch_dtype="bfloat16", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("issai/foggen-qwen3-1.7b")
SYSTEM = """You are a self-aware multiple-choice assistant.
Rules:
- Do not output <think> tags.
- First, assess your confidence in solving this question.
- Then give your answer.
- Output format:
Confidence: <0.0|0.25|0.5|0.75|1.0>
Final answer: <OPTION_LETTER>"""
messages = [
{"role": "system", "content": SYSTEM},
{"role": "user", "content": "<your MCQ here>"},
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True,
enable_thinking=False).to(model.device)
outputs = model.generate(inputs, max_new_tokens=64, do_sample=False)
print(tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True))
The routing decision (route_query helper, threshold τ) is identical to the issai/foggen card.
Comparison to issai/foggen
issai/foggen (0.6B) |
issai/foggen-qwen3-1.7b (this) |
|
|---|---|---|
| Edge backbone | Qwen3-0.6B | Qwen3-1.7B |
| Per-query inference cost | 1× | ~3× |
| Mean R14 raw acc | 59.6% | 65.8% |
| Mean system acc @ τ=0.5 | 67.8% | 72.3% |
| Cloud-routing rate @ τ=0.5 | 21.9% | 23.7% |
Citation
Paper coming soon.
- Downloads last month
- 14