Instructions to use Trelis/Qwen3.5-2B-conversational with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Trelis/Qwen3.5-2B-conversational with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Trelis/Qwen3.5-2B-conversational") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Trelis/Qwen3.5-2B-conversational") model = AutoModelForCausalLM.from_pretrained("Trelis/Qwen3.5-2B-conversational", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Trelis/Qwen3.5-2B-conversational 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 Trelis/Qwen3.5-2B-conversational:Q4_K_M # Run inference directly in the terminal: llama cli -hf Trelis/Qwen3.5-2B-conversational:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Trelis/Qwen3.5-2B-conversational:Q4_K_M # Run inference directly in the terminal: llama cli -hf Trelis/Qwen3.5-2B-conversational:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Trelis/Qwen3.5-2B-conversational:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Trelis/Qwen3.5-2B-conversational:Q4_K_M
Use Docker
docker model run hf.co/Trelis/Qwen3.5-2B-conversational:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use Trelis/Qwen3.5-2B-conversational with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Trelis/Qwen3.5-2B-conversational" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Trelis/Qwen3.5-2B-conversational", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Trelis/Qwen3.5-2B-conversational:Q4_K_M
- SGLang
How to use Trelis/Qwen3.5-2B-conversational 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 "Trelis/Qwen3.5-2B-conversational" \ --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": "Trelis/Qwen3.5-2B-conversational", "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 "Trelis/Qwen3.5-2B-conversational" \ --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": "Trelis/Qwen3.5-2B-conversational", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Trelis/Qwen3.5-2B-conversational with Ollama:
ollama run hf.co/Trelis/Qwen3.5-2B-conversational:Q4_K_M
- Unsloth Desktop
- Pi
How to use Trelis/Qwen3.5-2B-conversational with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Trelis/Qwen3.5-2B-conversational: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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Trelis/Qwen3.5-2B-conversational:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Trelis/Qwen3.5-2B-conversational with Docker Model Runner:
docker model run hf.co/Trelis/Qwen3.5-2B-conversational:Q4_K_M
- Lemonade
How to use Trelis/Qwen3.5-2B-conversational with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Trelis/Qwen3.5-2B-conversational:Q4_K_M
Run and chat with the model
lemonade run user.Qwen3.5-2B-conversational-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Trelis/Qwen3.5-2B-conversational with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Trelis/Qwen3.5-2B-conversational: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:9931/v1 hermes config set model.default Trelis/Qwen3.5-2B-conversational:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Trelis/Qwen3.5-2B-conversational with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Trelis/Qwen3.5-2B-conversational: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:9931/v1 \ --custom-model-id "Trelis/Qwen3.5-2B-conversational: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"
Request model access
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
By requesting access, you confirm your intended use qualifies under the PolyForm Small Business License or is covered by written permission from Trelis Research. You agree to share your details with Trelis and receive one access email.
Log in or Sign Up to review the conditions and access this model content.
Qwen3.5-2B-conversational
Try Conversational Gemma via API: trelis.com/api/conversational-gemma (hosted E4B conversational endpoint; sign in at console.trelis.com).
Use this ultra-compact 2B model to play the caller in a practice conversation or run an on-device conversational voice assistant with tool calling. A sales rep can interview a fictional buyer about their needs; a clinician can practice taking a history from a fictional patient using a clinician-reviewed case. The trainee asks the questions, and the caller answers from the case one turn at a time in natural spoken phrasing.
This repository packages standalone merged BF16 weights based on Qwen3.5-2B alongside text-only GGUF quantizations (Q8_0, Q6_K, and Q4_K_M) for fast on-device inference with llama.cpp, Ollama, or LM Studio.
Files and quantization options
In BF16 (3.79 GB), Qwen3.5-2B-conversational reaches 58/64 whole-call pass (90.6%), 32/32 openings, and 89.61% tool accuracy with zero runaways and zero repetition loops. For local llama.cpp deployment, Q8_0 (2.01 GB) matches BF16 tool accuracy (89.73%, 0 malformed) and achieves 55/64 whole-call pass; Q6_K (1.56 GB) balances footprint and recall; and Q4_K_M (1.29 GB) fits on tight edge hardware with 88.34% tool accuracy (48/64 whole-call pass, 0 runaways, 0 repetition loops).
| File / format | Size | SHA-256 | Recommended use |
|---|---|---|---|
| Standalone BF16 safetensors (repo root) | 3.79 GB |
- | GPU serving (vLLM, transformers, or MLX conversion) |
Qwen3.5-2B-conversational-Q8_0.gguf |
2.01 GB |
347a08793ace32d7e0062685883b398ee1dae45c936d88efbd682d22dab3bdeb |
Best local quant (89.73% tools, 0 malformed, 55/64 whole-call pass) |
Qwen3.5-2B-conversational-Q6_K.gguf |
1.56 GB |
834ee701b5f9de63375f2df1bd0f22cfcfe13a46adddb887b79dd781782f58ad |
Balanced local size and precision |
Qwen3.5-2B-conversational-Q4_K_M.gguf |
1.29 GB |
d4fa38512af07b18bb28acc27ae1ef0d33129c02c39bd92396eb2380e64300d3 |
Smallest on-device footprint (1.29 GB, 88.34% tool accuracy) |
Benchmarks
All arms below were evaluated on the same two suites:
- Held-out simulated caller suite:
32held-out phone scenarios across2random seeds (64full calls, up to20turns each) against a stock Gemma 4 31B support agent with four agent personas (helpful,rude,wrong,interrupting). All64-call transcripts and32two-turn openings across all arms were graded together in one blinded, shuffled run ongemini-3.8-flash(thinking_level="low", provider default temperature,0judge errors). - Tool-calling replay suite:
789unforced tool-calling attempts (263held-out multi-turn cases x3seeds) scored on exact decision agreement and malformed tool syntax. - Spoken-phone perplexity (
Val PPL): held-out600-turn spoken telephone validation set (val.jsonl). StockQwen/Qwen3.5-2Bscores22.80on this set (81.62%tools with11malformed calls); this release scores14.78(89.61%tools with1malformed call).
| Model / Precision | Tool acc /789 (malformed) | Openings /32 | Role /64 | Facts /64 | Goal /64 | Delivery /64 | Whole-call pass /64 | Runaways / Rep loops | Median words/turn |
|---|---|---|---|---|---|---|---|---|---|
google/gemma-4-31B-it (stock 31B ref) |
95.18% (1) |
32/32 |
64 |
63 |
64 |
64 |
63/64 |
0 / 0 |
21.0 |
Trelis/gemma-4-31B-it-conversational (31B ref) |
93.16% (2) |
27/32 |
64 |
64 |
61 |
63 |
61/64 |
0 / 3 |
14.0 |
Trelis/gemma-4-E4B-it-conversational (E4B BF16) |
91.63% (0) |
32/32 |
64 |
64 |
63 |
64 |
63/64 |
0 / 0 |
17.0 |
| This release (BF16, vLLM) | 89.61% (1) |
32/32 |
64 |
59 |
63 |
64 |
58/64 |
0 / 0 |
16.0 |
This release (Q8_0 GGUF, llama.cpp) |
89.73% (0) |
29/32 |
64 |
55 |
64 |
64 |
55/64 |
0 / 0 |
31.5 |
This release (Q4_K_M GGUF, llama.cpp) |
88.34% (1) |
28/32 |
64 |
49 |
62 |
63 |
48/64 |
0 / 0 |
29.0 |
Recommended decoding settings
Always serve Qwen3.5-2B-conversational with Qwen3.5 non-thinking sampling parameters and thinking disabled (enable_thinking=False):
temperature = 0.7top_p = 0.8top_k = 20presence_penalty = 1.5(important invLLMandllama.cppto prevent repetition loops)
Caller: the model is the person calling
Write the caller's facts, then describe what they say up front and what the trainee has to ask about. To reproduce the standard phone-caller prompt and end_call schema locally, use caller.json:
import json
from pathlib import Path
from huggingface_hub import hf_hub_download
caller = json.loads(Path(hf_hub_download("Trelis/Qwen3.5-2B-conversational", "caller.json")).read_text())
card = caller["card"] # Replace with your own caller facts and opening instructions.
system = caller["system"].replace("<<CALLER>>", card.strip() + "\n\n" + caller["style"])
messages = [
{"role": "system", "content": system},
{"role": "user", "content": "Thanks for calling the shop. How can I help?"},
]
tools = caller["tools"]
The trainee speaks as user; the generated assistant message is the caller. When the caller invokes end_call, its farewell argument is the spoken goodbye.
Assistant: the model is the person answering
Use the same chat template. Replace the caller card and speaking instructions with the assistant's job, what it needs to ask, and when to use its tools. Now user is the caller, and assistant is the support agent. Pass the tool schema separately:
messages = [
{
"role": "system",
"content": "You answer repair calls for a bike shop. Ask for the ticket number if it is missing. To check repair status, use lookup_repair and tell the caller what it returns.",
},
{"role": "user", "content": "Is my repair ready? My ticket is B42."},
]
tools = [
{
"type": "function",
"function": {
"name": "lookup_repair",
"description": "Look up the status of a repair ticket.",
"parameters": {
"type": "object",
"properties": {"ticket": {"type": "string"}},
"required": ["ticket"],
},
},
}
]
Your app executes the requested tool, appends the assistant's tool_calls message, appends a role: "tool" message with the matching tool_call_id and tool result, and renders again to generate the spoken reply. When rendering locally with apply_chat_template, pass a Python dictionary for function.arguments.
Load and serve the model
Transformers (BF16)
from transformers import AutoModelForCausalLM, AutoTokenizer
name = "Trelis/Qwen3.5-2B-conversational"
tokenizer = AutoTokenizer.from_pretrained(name)
model = AutoModelForCausalLM.from_pretrained(name, device_map="cuda", dtype="bfloat16")
inputs = tokenizer.apply_chat_template(
messages,
tools=tools,
add_generation_prompt=True,
enable_thinking=False,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
output = model.generate(**inputs, max_new_tokens=256, do_sample=True, temperature=0.7, top_p=0.8, top_k=20)
print(tokenizer.decode(output[0, inputs.input_ids.shape[1]:], skip_special_tokens=False))
vLLM (BF16)
vllm serve Trelis/Qwen3.5-2B-conversational \
--dtype bfloat16 \
--max-model-len 12288 \
--enable-auto-tool-choice \
--tool-call-parser qwen3_coder
Send structured messages (and tools when needed) to /v1/chat/completions with chat_template_kwargs: {"enable_thinking": false}, temperature=0.7, top_p=0.8, top_k=20, and presence_penalty=1.5.
llama.cpp (GGUF)
llama-server -hf Trelis/Qwen3.5-2B-conversational:Q8_0 \
--port 8080 -ngl 99 -c 16384 --jinja \
--temp 0.7 --top-p 0.8 --top-k 20 --presence-penalty 1.5
Training summary
This checkpoint was trained in three stages across all linear projections (including all Gated DeltaNet layers) of Qwen/Qwen3.5-2B:
- Expanded rejection-sampled distillation SFT: Shuffled LoRA fine-tuning (
r=32, alpha=64) on28,662mixed turns built from2,558gold and272silver synthetic phone calls generated by Conversational Gemma 4 31B (save 74) across989unique training scenarios, anchored with1,500spoken telephone turns,2xmulti-turn Dialt tool examples (3,554rows), and2xQwen3.5-27B-verified leak-freeWhen2Calltool examples (4,216rows). - Same-family reverse-KL tool OPD (
80steps): On-policy full-sequence reverse-KL distillation from frozenQwen/Qwen3.5-27Bwith2xcall-trigger weighting across2,948Dialt andWhen2Calltool turns and a0.35gold caller anchor (88.34%tool accuracy,0malformed calls). - On-policy caller DPO polish (
48steps): Generated700on-policy rollouts from the Stage 2 checkpoint across350training scenarios, identified failing turns withgemini-3.8-flash, synthesized and verified358exact shared-promptsave 74replacement turns, and trained length-normalized DPO (beta=0.10) with a positive SFT anchor (0.15) and a verifiedQwen3.5-27Btool CE anchor (0.35), raising whole-call pass to58/64(32/32openings,64/64delivery,0loops) and tool accuracy to89.61%.
Limitations
- Tuned for spoken English phone conversations; non-English performance and formal long-form writing were not targeted.
- At 2B parameters, dense multi-fact recall (
59/64facts,58/64whole-call pass BF16) and tool accuracy (89.61%) trail Trelis/gemma-4-E4B-it-conversational (63/64whole-call pass,91.63%tools) and the 31B flagship (93.16%tools). - Under
llama.cpp,Q8_0andQ4_K_Mproduce somewhat longer spoken turns (29.0to31.5median words) thanvLLMBF16 (16.0), andQ4_K_Mdrops dense factual recall to49/64; preferQ8_0(2.01 GB,55/64whole-call pass) when memory permits. - Using high-temperature sampling without
presence_penaltyincreases repetition risk; keep the recommended Qwen3.5 decoding settings above. - The GGUF files contain text-only weights.
License
The conversational modifications are offered under the PolyForm Small Business License 1.0.0. The original Qwen3.5-2B weights are licensed under Apache 2.0. This repository incorporates the conversational modifications in merged BF16 and text-only GGUF formats.
- Downloads last month
- 3