mainger-qwen2.5-1.5b-ft

Fine-tuned Qwen2.5-1.5B-Instruct for the mainger-agent — an LLM agent that drives the mainger R package for Mahalanobis-integrated regression under privacy constraints.

This is an anonymous release accompanying a submission to STAIX 2026.

Intended use

Tool-calling assistant for the mainger-agent: parses user requests about external-data integration, selects a sharing regime (full / partial / restricted), calls into the R package via the agent's tool layer, and explains the returned diagnostics. Not intended as a general-purpose chat model.

How to load

The model was fine-tuned with LoRA and the adapter has been merged into the base weights, so it loads exactly like any Qwen2.5-1.5B checkpoint:

from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained(
    "mainger/mainger-qwen2.5-1.5b-ft",
    torch_dtype="bfloat16",
    device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("mainger/mainger-qwen2.5-1.5b-ft")

Serving with vLLM (extended 65k context)

The agent uses YaRN rope-scaling to extend the native 32k context to 65k. Tool calling uses the hermes parser:

vllm serve mainger/mainger-qwen2.5-1.5b-ft \
  --served-model-name qwen-1.5b-ft \
  --max-model-len 65536 \
  --rope-scaling '{"rope_type":"yarn","factor":2.0,"original_max_position_embeddings":32768}' \
  --enable-auto-tool-choice \
  --tool-call-parser hermes \
  --dtype bfloat16 \
  --gpu-memory-utilization 0.85

Note on the rope-scaling key. The JSON uses "rope_type" (not "type"). HF transformers ≥ 4.45 renamed the field; vLLM ≥ 0.6.6 follows the new convention. Older vLLM or transformers may still accept "type"; on a mismatched pair you'll see KeyError: 'rope_type' at startup.

Compatible toolchain pin

vLLM 0.6.6.post1 expects transformers == 4.47.x. With a newer transformers the tokenizer call all_special_tokens_extended is missing and vLLM crashes on startup. Pin the matching pair:

pip install "vllm>=0.6,<0.7" "transformers==4.47.1"

Training

  • Base model: Qwen/Qwen2.5-1.5B-Instruct
  • Method: LoRA fine-tuning, merged back into base weights
  • Precision: BF16
  • Task: Tool-calling for the mainger-agent's R-package interface

Reproducibility

The agent that uses this model fixes cv_seed = 548 when calling mainger::mainger(..., tuning = "cv", cv_seed = 548), producing bit-identical integration results across machines.

License

Apache 2.0 (inherited from Qwen2.5-1.5B-Instruct).

Downloads last month
38
Safetensors
Model size
2B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for mainger/mainger-qwen2.5-1.5b-ft

Finetuned
(1594)
this model