MathFT4B

MathFT4B (AstraAI v26) is a Qwen3.5-4B LoRA fine-tune for Slovenian third-year secondary-school mathematics. The project uses the model to classify tasks and extract structured arguments for bounded mathematics tools.

This repository contains the final trained adapter in Hugging Face PEFT format, its GGUF export, the exact paired GGUF base, and tokenizer files. The fine-tuned weights are a LoRA adapter and must be loaded with the base model. The GGUF file named v26-neural-turns-full.gguf is the complete adapter, despite its historical name; it is not a standalone merged model.

The original application adds tool execution, validation, graph rendering, and user-interface behavior. Downloading these weights alone does not reproduce that complete application or its reported results.

Files

Path Contents
adapter_model.safetensors Final v26 checkpoint: 32 FP32 LoRA factors, about 8.5 MB
adapter_config.json PEFT configuration, with a portable public base-model ID and pinned revision
tokenizer.json, tokenizer_config.json, merges.txt, vocab.json Original tokenizer
gguf/qwen35_nf4_training_base_q8_0_no_mtp.gguf Paired NF4-derived Q8_0 text base, about 4.48 GB
gguf/v26-neural-turns-full.gguf GGUF LoRA adapter, about 4.3 MB
publication.json, SHA256SUMS Provenance, source checks, and download checksums
licenses/ Upstream Qwen license and model card

The original BF16 base weights remain available from Qwen/Qwen3.5-4B. Both original weight-shard SHA-256 values match upstream revision 851bf6e806efd8d0a36b00ddf55e13ccb7b8cd0a; those weights are not duplicated here.

Download and check

Install the Hugging Face CLI, then run:

hf download RokLog/MathFT4B --local-dir MathFT4B
cd MathFT4B
python3 verify_checksums.py

Load the paired GGUF files

Use a llama.cpp build supporting Qwen3.5 and GGUF LoRA adapters. The source project used llama.cpp b10978 on Linux x86-64 CPU. With llama-server installed:

llama-server \
  -m gguf/qwen35_nf4_training_base_q8_0_no_mtp.gguf \
  --lora gguf/v26-neural-turns-full.gguf \
  --ctx-size 4096 \
  --threads 4 \
  --n-gpu-layers 0 \
  --host 127.0.0.1 \
  --port 8080

The server exposes its local interface at http://127.0.0.1:8080. Both -m and --lora are required. The base was derived from the NF4 training representation; substituting another Qwen GGUF changes the pairing. The supplied GGUF base omits vision and MTP components. The source project planned for at least 16 GB host RAM for a practical local trial; this is not a measured minimum on other computers.

Load the PEFT adapter

The following is the model-loading path for integration or further development. It requires PyTorch, Transformers with Qwen3.5 support, PEFT compatible with the saved 0.21.0 adapter configuration, and sufficient memory. It downloads the original base weights and loads them in their original precision:

from transformers import AutoTokenizer, Qwen3_5ForConditionalGeneration
from peft import PeftModel

revision = "851bf6e806efd8d0a36b00ddf55e13ccb7b8cd0a"
tokenizer = AutoTokenizer.from_pretrained("RokLog/MathFT4B")
base = Qwen3_5ForConditionalGeneration.from_pretrained(
    "Qwen/Qwen3.5-4B", revision=revision, dtype="auto"
)
model = PeftModel.from_pretrained(base, "RokLog/MathFT4B")
model.eval()

Training used double-quantized NF4 base weights with FP32 compute on CPU. Loading the adapter on the original-precision base, as above, has not been qualified as numerically identical to the paired GGUF runtime. The intended runtime disables thinking in the Qwen chat template and uses structured task prompts plus tool schemas; general free-form chat is outside the original qualification scope.

Training and evaluation scope

The final v26 training stage completed 425 optimizer updates. The preserved lineage records 7,434 cumulative updates. The adapter has rank 16, alpha 32, and factors on layers 24โ€“31 targeting q_proj, v_proj, in_proj_qkv, and out_proj where applicable. The source export report verifies all 32 factors after FP16 conversion and documented head ordering.

The source bundle reports 168/170 complete answers for the model plus tools and validation, compared with 46/170 for the same base without the adapter. These are historical, project-specific synthetic curriculum checks, not a fresh test of this upload or a standalone-model benchmark. Mathematical families overlap training; no external teacher certification is claimed. The two retained errors concerned a rational-function pole and a millimeter conversion. Accuracy and latency on another computer require separate validation.

Publication checks verify original artifact hashes, all adapter tensor bounds and finite values, and GGUF v3 headers. No new inference, training, accuracy test, or performance measurement was run for this publication.

License and attribution

The base model is Qwen/Qwen3.5-4B, distributed under Apache-2.0; its license and original model card are preserved in licenses/. This publication does not assign an additional license to AstraAI-specific fine-tuning, project code, or curriculum data. Training datasets, optimizer state, private diagnostics, application source, and runtime binaries are not included in this model release.

Downloads last month
200
GGUF
Model size
2.13M params
Architecture
qwen35
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 RokLog/MathFT4B

Finetuned
Qwen/Qwen3.5-4B
Adapter
(891)
this model