Instructions to use marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64 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 marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0 # Run inference directly in the terminal: llama cli -hf marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0 # Run inference directly in the terminal: llama cli -hf marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0
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 marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0
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 marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0
Use Docker
docker model run hf.co/marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0
- LM Studio
- Jan
- vLLM
How to use marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0
- SGLang
How to use marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64 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 "marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64" \ --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": "marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64", "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 "marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64" \ --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": "marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64 with Ollama:
ollama run hf.co/marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0
- Unsloth Desktop
- Pi
How to use marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0
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": "marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64 with Docker Model Runner:
docker model run hf.co/marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0
- Lemonade
How to use marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0
Run and chat with the model
lemonade run user.qwen3-1.7b-binary-rp-b3-hold-r64-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0
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 marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0
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 "marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64:Q8_0" \ --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"
b3_binary_hold_r64 โ Qwen3-1.7B LoRA-QAT binary (roleplay PT-BR)
Manual LoRA + binary QAT adapter for Qwen3-1.7B, trained for Brazilian Portuguese roleplay.
Results (vs Bonsai 1.7B baseline ~82.5)
| Metric | Value |
|---|---|
| Aggregate RP (3 seeds) | 89.27 ยฑ 2.06 |
| PT purity | 1.000 |
| ACCatom | 1.000 |
| Collapsed | 0 |
| blend_alpha (train ckpt / bench) | 1.0 / 1.0 |
Seeds: 42 โ 91.2 ยท 123 โ 89.5 ยท 2026 โ 87.1
Eval: data/pt_rp_v3_test (42 scenes), script bench_v8_lora.py.
Training recipe
- Base: Qwen3-1.7B
- Quant: binary on MLP only (
quant_targets=mlp) - Schedule: warmup 300 โ ramp 1200 โ full ฮฑ=1.0 from step 1500; saved at step 6600
- LoRA: r=64, alpha=128, residual=True, rsLoRA, soft-tanh STE, pre-RMSNorm
- KD: KL weight 2.0, temp 5.0
- Data:
cpt_mix_v3/train.jsonl - Early-stop: smoke_5fail@6700 (full eval still strong)
Files
| File | Description |
|---|---|
best_lora.pt |
Best checkpoint (by val loss) โ use this |
final_lora.pt |
Last step before smoke abort |
adapter_config.json |
Hyperparameters for loading |
exp_metrics.json |
Training metrics |
bench_results.json |
Full 3-seed eval |
Load (cluster / repo scripts)
import torch
from scripts.exp_v8_lora import inject_lora, load_v8_lora, set_quant_schedule
from scripts.bench_v8_lora import ... # or train helpers
ckpt = torch.load("best_lora.pt", map_location="cpu", weights_only=False)
# inject_lora(..., quant_mode="binary", r=64, alpha=128, residual=True,
# quant_targets="mlp", use_rmsnorm=True, rs_lora=True, soft_tanh=True)
# set_quant_schedule(warmup+ramp, warmup, ramp) # force alpha=1.0
# load_v8_lora(model, "best_lora.pt")
Not a PEFT/peft adapter โ custom LoRALinear + binary STE from this project.
License
Weights are a derivative of Qwen3-1.7B. Follow the base model license (Apache 2.0) and applicable Qwen terms.
- Downloads last month
- 19
8-bit