Instructions to use DeliVali/AIDAM_MATH_1.7B_V1.0.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use DeliVali/AIDAM_MATH_1.7B_V1.0.0 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-1.7B-Base") model = PeftModel.from_pretrained(base_model, "DeliVali/AIDAM_MATH_1.7B_V1.0.0") - Transformers
How to use DeliVali/AIDAM_MATH_1.7B_V1.0.0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DeliVali/AIDAM_MATH_1.7B_V1.0.0") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("DeliVali/AIDAM_MATH_1.7B_V1.0.0", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DeliVali/AIDAM_MATH_1.7B_V1.0.0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DeliVali/AIDAM_MATH_1.7B_V1.0.0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DeliVali/AIDAM_MATH_1.7B_V1.0.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DeliVali/AIDAM_MATH_1.7B_V1.0.0
- SGLang
How to use DeliVali/AIDAM_MATH_1.7B_V1.0.0 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 "DeliVali/AIDAM_MATH_1.7B_V1.0.0" \ --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": "DeliVali/AIDAM_MATH_1.7B_V1.0.0", "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 "DeliVali/AIDAM_MATH_1.7B_V1.0.0" \ --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": "DeliVali/AIDAM_MATH_1.7B_V1.0.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DeliVali/AIDAM_MATH_1.7B_V1.0.0 with Docker Model Runner:
docker model run hf.co/DeliVali/AIDAM_MATH_1.7B_V1.0.0
AIDAM_MATH_1.7B_V1.0.0
A math-solving skill model. Given a grade-school word problem, it reasons in
text and writes its final numeric answer inside \boxed{}. Trained with
RLVR (GRPO) directly on GSM8K, with no supervised fine-tuning stage.
This model solves math problems. It is a different, complementary piece from this project's fact-checking verifiers, which judge whether a claimed number follows from given evidence rather than deriving one β opposite jobs on the same subject matter, and the project's own design principle is that a model never grades its own kind of output.
Model details
| Task | Text generation β step-by-step reasoning ending in a boxed numeric answer |
| Architecture | Qwen3-1.7B-Base + LoRA adapters (QLoRA: 4-bit frozen base) |
| Total parameters (base + adapters) | 1,738,007,552 |
| Trained parameters | 17,432,576 (1.003% of the total β only the LoRA adapters) |
| Base checkpoint | Qwen/Qwen3-1.7B-Base (Apache 2.0) |
| Adapter format | PEFT LoRA (adapter_config.json + adapter_model.safetensors, ~67 MB) β the frozen base is downloaded separately at load time and never duplicated on disk |
| License | Apache 2.0 |
| Training method | RLVR / GRPO (Dr.GRPO-corrected: mean-centered advantage, no per-sequence length normalization), with a deterministic SymPy-based reward β never a model-based judge |
| Language | Base model is broadly multilingual (Qwen3 supports 119 languages and dialects); this fine-tune's own training and evaluation used English GSM8K problems only β see "What this is not" |
Benchmark: GSM8K
Measured on GSM8K (Cobbe et al., 2021), test split β 1,319 problems.
Metric: exact-match accuracy on the boxed final answer, greedy decoding,
using deterministic symbolic-equivalence matching (so 72 and 72/1 are
scored identically; a completion with no parseable boxed answer scores 0).
| Base model, zero-shot | This model | Change | |
|---|---|---|---|
| Accuracy | 74.22 | 80.89 | +6.67 |
| Boxed-answer rate (200-item sample) | not measured | 95.5 | β |
This model was measured against a pre-registered, four-clause gate before training began:
- Accuracy > 76.98 (gate threshold, two measurement-noise bands above the 74.22 zero-shot baseline): scored 80.89 β pass, 3.91 points above threshold, roughly 2.83 noise bands clear (1 standard error = 1.38 points on n=1,319) β the clearest first-attempt margin of any model promoted in this project's current training era
- Boxed-answer rate β₯ 95.0, measured on a 200-item sample (a full 1,319-item boxed-rate run was not run to completion; running checkpoints at 50 / 100 / 150 / 200 items β 96.0 / 97.0 / 97.3 / 95.5 β show no downward trend): scored 95.5 β pass, narrowly (see "What this is not")
- Declared parameter budget < 2,000,000,000: 1,738,007,552 β pass. (This slot's ceiling is intentionally wider than a 1-1.5B target range would suggest, because QLoRA trains a small adapter, not new dense parameters, so nothing from this training approach approaches 2B regardless of the base model's own size.)
- Zero train/test leakage: pass β structural, the training code reads GSM8K's own train/test split field directly rather than a custom partition
Training
- Base checkpoint:
Qwen/Qwen3-1.7B-Base - Method: reinforcement learning with verifiable rewards (RLVR) via GRPO, directly on GSM8K, with no supervised fine-tuning stage first
- LoRA configuration: rank 16, alpha 32, applied to the query/key/value/output and gate/up/down projection matrices
- Learning rate 1e-5, 300 training steps, 8 prompts per step with a group size of 4 (32 sampled completions per step), max 400 new tokens per generation, gradient checkpointing, bf16
- Best checkpoint: step 140 of 300, internal dev accuracy 85.0 (measured on a 40-row holdout carved from GSM8K's own train split, never from the test split used for the gate)
- Hardware: a single 12 GB consumer GPU, ~8.1 hours training time β the slowest of any model promoted in this project's current training era per wall-clock minute, a direct consequence of GRPO's own generation cost (32 full completions sampled per gradient step) rather than a training inefficiency
- This was the first real training attempt for this specialisation to reach evaluation. A pre-launch debugging pass found and fixed a subtle bug first: gradient checkpointing forces the model's key/value cache off whenever it is in training mode, which silently broke incremental decoding during the training loop's own sampling step and degenerated every generated completion into repeated garbage if sampling happened while the model was still in train mode. A first real launch without this fix ran 10 steps at zero mean reward throughout β not slower training, no learning signal at all β caught by reading the actual generated text rather than trusting the absence of a crash, and fixed before the training run that produced this checkpoint.
What this is not
- This score is specific to GSM8K-style grade-school arithmetic word problems in English. It is not a general mathematical reasoning benchmark. No measurement exists yet for harder benchmarks (such as the MATH dataset) or for Spanish-language word problems.
- The base checkpoint is broadly multilingual (Qwen3 models are documented to support 119 languages and dialects), but this fine-tune's own RLVR training and its GSM8K gate evaluation used English problems only. No Spanish-language measurement exists for this checkpoint.
- The boxed-answer-rate gate clause (95.5 against a 95.0 floor) is a narrow clearance measured on a 200-item sample, not the full 1,319-item test split β recorded honestly as an estimate, not a full-split figure.
- This is not the same measurement as this project's math-claim verifiers. This model derives a numeric answer to a problem; it does not judge whether an already-stated number correctly follows from given evidence. A strong score here says nothing about performance on that separate, opposite task, by design β no model in this project evaluates its own kind of output.
Usage
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
base = "Qwen/Qwen3-1.7B-Base"
adapter = "DeliVali/AIDAM_MATH_1.7B_V1.0.0"
tokenizer = AutoTokenizer.from_pretrained(adapter)
model = AutoModelForCausalLM.from_pretrained(
base,
quantization_config=BitsAndBytesConfig(
load_in_4bit=True, bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_quant_type="nf4", bnb_4bit_use_double_quant=True,
),
device_map="cuda",
)
model = PeftModel.from_pretrained(model, adapter).eval()
prompt = (
"Natalia sold clips to 48 of her friends in April, and then she sold "
"half as many clips in May. How many clips did Natalia sell altogether "
"in April and May?\n\nPlease reason step by step, and put your final "
"answer within \\boxed{}."
)
enc = tokenizer(prompt, return_tensors="pt").to(model.device)
out = model.generate(**enc, max_new_tokens=512, do_sample=False,
pad_token_id=tokenizer.pad_token_id)
print(tokenizer.decode(out[0][enc["input_ids"].shape[1]:], skip_special_tokens=True))
- Downloads last month
- 13
Model tree for DeliVali/AIDAM_MATH_1.7B_V1.0.0
Base model
Qwen/Qwen3-1.7B-Base