Views
No views yet

| group | parse | fidelity | n |
|---|---|---|---|
| valid (in-training shapes) | 97% | 95% | 64 |
| holdout (withheld shapes) | 98% | 95% | 64 |
| base | unsloth/Qwen3-4B-Instruct-2507 |
| method | LoRA (PEFT) via unsloth |
| rank / alpha | 32 / 64 |
| lora_dropout | 0.05 |
| learning rate | 0.0001 (constant) |
| seq length | 2048 |
| epochs / examples | 2.56 / 48000 |
| final train / eval loss | 0.10483384132385254 / 0.10513444989919662 |
glaiveai/glaive-function-calling-v2
(Apache-2.0), kept only where they round-trip losslessly. Full recipe:
RECIPE.md.1from peft import PeftModel
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4base = AutoModelForCausalLM.from_pretrained("unsloth/Qwen3-4B-Instruct-2507")
5tok = AutoTokenizer.from_pretrained("skrrt-sh/raif-qwen3-4b-lora")
6model = PeftModel.from_pretrained(base, "skrrt-sh/raif-qwen3-4b-lora")bun, nothing to clone):pip install raif-format # or: uv add raif-format1from raif import decode # installs as `raif-format`, imports as `raif`
2
3result = decode(model_output) # {"ok", "value", "repairs"}
4data = result["value"] if result["ok"] else None # ordinary JSON, ready downstreamdecode_lenient() recovers the intact leaves of a truncated stream. The codec is
the same one used to score this model, kept byte-identical across Python and
TypeScript by a shared conformance corpus.raif-vllm is a
single vLLM plugin that makes a stock OpenAI endpoint speak RAIF transparently:
existing clients get RAIF on tools and response_format with no proxy and no
client changes — the model emits compact RAIF-G and the plugin decodes it to JSON
at the boundary, so the decode() step above moves server-side. Verified
end-to-end on vLLM 0.19.1pip install raif-vllm
2VLLM_PLUGINS=raif vllm serve Qwen/Qwen3-4B-Instruct-2507 \
3 --enable-lora --lora-modules raif=skrrt-sh/raif-qwen3-4b-lora \
4 --max-lora-rank 32 --max-model-len 8192 \
5 --chat-template "$(raif-vllm-chat-template qwen-4b)" \
6 --reasoning-parser raif --enable-auto-tool-choice --tool-call-parser raifraif-vllm-chat-template qwen-4b
resolves its path. The plugin strips Qwen3's leading <think> block at the decode boundary automatically — no client change.raif-format on PyPI · raif-format on npmraif-vllm on PyPIglaiveai/glaive-function-calling-v2 (Apache-2.0) — attribute Glaive AI.