How to use from
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
Quick Links

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
GGUF
Model size
2B params
Architecture
qwen3
Hardware compatibility
Log In to add your hardware

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for marcosremar2/qwen3-1.7b-binary-rp-b3-hold-r64

Finetuned
Qwen/Qwen3-1.7B
Adapter
(652)
this model