Instructions to use jxx123/loop-qwen35-2b 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 jxx123/loop-qwen35-2b 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 jxx123/loop-qwen35-2b:F16 # Run inference directly in the terminal: llama cli -hf jxx123/loop-qwen35-2b:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf jxx123/loop-qwen35-2b:F16 # Run inference directly in the terminal: llama cli -hf jxx123/loop-qwen35-2b:F16
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 jxx123/loop-qwen35-2b:F16 # Run inference directly in the terminal: ./llama-cli -hf jxx123/loop-qwen35-2b:F16
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 jxx123/loop-qwen35-2b:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf jxx123/loop-qwen35-2b:F16
Use Docker
docker model run hf.co/jxx123/loop-qwen35-2b:F16
- LM Studio
- Jan
- Ollama
How to use jxx123/loop-qwen35-2b with Ollama:
ollama run hf.co/jxx123/loop-qwen35-2b:F16
- Unsloth Desktop
- Pi
How to use jxx123/loop-qwen35-2b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jxx123/loop-qwen35-2b:F16
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": "jxx123/loop-qwen35-2b:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use jxx123/loop-qwen35-2b with Docker Model Runner:
docker model run hf.co/jxx123/loop-qwen35-2b:F16
- Lemonade
How to use jxx123/loop-qwen35-2b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull jxx123/loop-qwen35-2b:F16
Run and chat with the model
lemonade run user.loop-qwen35-2b-F16
List all available models
lemonade list
- Hermes Agent
How to use jxx123/loop-qwen35-2b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jxx123/loop-qwen35-2b:F16
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 jxx123/loop-qwen35-2b:F16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use jxx123/loop-qwen35-2b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jxx123/loop-qwen35-2b:F16
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 "jxx123/loop-qwen35-2b:F16" \ --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"
loop-qwen35-2b — Qwen3.5-2B closed-loop insulin controller (Gemini-distilled)
Qwen3.5-2B LoRA-distilled from a gemini-3-flash-preview insulin-control policy
for closed-loop type-1-diabetes control in the simglucose simulator. Emits the
next basal/bolus action chunk plus a short auditable clinical rationale, from a
rolling CGM/insulin/carb history and a deterministically computed insulin-on-board.
Result — held-out 9 patients (48 h, seed 42, bf16)
| model | Q4 size | ANN TIR | ANN TBR | ANN surv | UNANN TIR | UNANN TBR | UNANN surv |
|---|---|---|---|---|---|---|---|
| Qwen3.5-4B | 2.7 GB | 80.8 | 2.1 | 9/9 | 73.8 | 2.2 | 9/9 |
| this (Qwen3.5-2B) | ~1.3 GB | 81.8 | 1.8 | 9/9 | 73.6 | 1.6 | 9/9 |
| Gemini teacher | — | — | — | — | 73.9 | 3.0 | 9/9 |
The 2B matches the 4B at half the size — +1.0 pp TIR announced, −0.2 pp unannounced (noise), slightly lower hypo on both, 9/9 survival in both meal conditions with zero deaths. Unannounced TIR 73.6 ≈ teacher parity (73.9). "Unannounced" = 50 % of meals hidden from the controller (patient forgets to announce) — the realistic failure mode. Train loss 0.364 (4B: 0.338).
Files
adapter_model.safetensors— LoRA (r32,all-linear; Qwen3.5's hybrid linear-attention layers requireall-linear). Merge ontoQwen/Qwen3.5-2B.qwen35-2b-f16.gguf— merged f16 GGUF, already patched for llama.cpp/Ollama (Qwen3.5's phantom MTP block removed:block_count->24,nextn_predict_layers->0). Deploy:ollama create loop-qwen35-2b --quantize q4_K_M -f Modelfile(Ollama >=0.32), withFROM qwen35-2b-f16.gguf/PARAMETER num_ctx 4096/PARAMETER temperature 0.
Notes
- Non-thinking: the chat template emits an empty
<think></think>; the model answers with JSON directly. Training and eval use identical rendering (no train/serve skew). - Data:
jxx123/loop-distill-data(distill_sft_v16.jsonl, simulator only). Trained on 21 non-held-out patients; the 9 eval patients are excluded.
⚠️ Research / simulation only — not a medical device.
- Downloads last month
- -
16-bit