CoolFace
Modelpublic

apol/alia-40b-distill-vapol

sourceHugging Faceapache-2.0updated 5mo agoView on Hugging Face
2likes248downloads
Model Card

ALIA-40B Distill Vapol

apol/alia-40b-distill-vapol is a post-trained release derived from BSC-LT/ALIA-40b-instruct-2601, optimized for practical multilingual assistant behavior, structured output reliability, tool-call formatting, RAG-style answers, and coding/debugging tasks.

Interactive demo Space: apol/alia-40b-distill-vapol-demo

Detailed technical article in Spanish: BLOG.md

Deliverables

This repo contains:

ArtifactLocationUse
Q4KM GGUFgguf_chunks/ALIA-40b-distill-vapol-Q4_K_M.gguf.part-*Transport chunks for reconstructing the single-file llama.cpp / LM Studio deployment.
PEFT adapteradapter/Highest-fidelity Hub artifact; load on top of BSC-LT/ALIA-40b-instruct-2601 for adapter-based inference or further research.
Runtime helperruntime/repair_eval_responses.pyOptional deterministic repair layer for strict JSON/tool/RAG/code contracts.
Evaluation reportsreports/Local task metrics, hidden-suite validation outputs, and distillation summaries.

Intended Use

The model is intended for general assistant use, with emphasis on:

  • Spanish assistant tasks.
  • Catalan, Basque, and Galician instruction following.
  • Structured JSON output.
  • Tool-call formatting and missing-argument clarification.
  • Administrative and legal-style summarization.
  • Coding/debugging assistance.
  • Source-grounded long-context and RAG-style synthesis.

Loading

PEFT Adapter

python
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

base = "BSC-LT/ALIA-40b-instruct-2601"
repo = "apol/alia-40b-distill-vapol"

tokenizer = AutoTokenizer.from_pretrained(repo, subfolder="adapter")
model = AutoModelForCausalLM.from_pretrained(base, device_map="auto", torch_dtype="auto")
model = PeftModel.from_pretrained(model, repo, subfolder="adapter")

llama.cpp / LM Studio

The Q4KM GGUF is published as transport chunks for reliable Hub distribution. Reassemble it locally before loading:

bash
cat gguf_chunks/ALIA-40b-distill-vapol-Q4_K_M.gguf.part-* > ALIA-40b-distill-vapol-Q4_K_M.gguf
sha256sum ALIA-40b-distill-vapol-Q4_K_M.gguf

Expected SHA256:

text
45f75478c721cf26617dc10f89bbfc663f5946a3779ddd19982bb7787790d285

Then load the reassembled file:

bash
llama-cli \
  -m ALIA-40b-distill-vapol-Q4_K_M.gguf \
  -c 4096 \
  -ngl 99 \
  --temp 0.2 \
  -p "<prompt>"

What Was Improved

The work focused on competence and performance on practical assistant tasks rather than broad memorization. The main interventions were:

LeverWhat was appliedResearch influence
Targeted QLoRA SFTEfficient LoRA/QLoRA post-training on high-value assistant behaviors.QLoRA and HF FSDP/QLoRA practice.
Hard-example active distillationData came from actual model failures: invalid JSON, missing tool fields, citation mistakes, weak multilingual responses, and incomplete code fixes.DeepSeek-style staged post-training and rejection-sampling distillation.
DPO preference alignmentChosen/rejected pairs contrasted corrected outputs against current-model failure patterns.DPO, SimPO/ORPO-style preference optimization ideas.
Verifier-first gatesDeterministic validators controlled JSON validity, tool-call shape, citations, and task constraints before promotion.RLVR/GRPO-style emphasis on verifiable rewards and automatic gates.
Tool/RAG task shapingTraining examples used realistic tool contracts, missing arguments, citation requirements, and multilingual source-grounded answers.DeepSeek V4, Kimi agentic training reports, HF Cookbook, and Smol Training Playbook.

These references informed design choices. This release does not claim to reproduce frontier-scale RL or agentic training.

Local Evaluation

The following local suites are deterministic assistant-task evaluations. They measure structured output, tool-call behavior, source-grounded answers, code fixes, and language constraints. They are not a substitute for a full academic benchmark campaign.

Model / ArtifactVisible assistant evalHidden verifier-first suiteHidden competence suiteNotes
BSC-LT/ALIA-40b basenot directly comparablenot applicablenot applicableRaw completion model; not instruction aligned.
BSC-LT/ALIA-40b-instruct-260121/80 rows, 386/519 checksbaseline not includedbaseline not includedOriginal instruction model under local validator style.
Distill Vapol adapter33/80 rows, 446/519 checks16/20 rows, 111/115 checks11/20 rows, 100/115 checksBest model-only result.
Distill Vapol with deterministic runtime repair41/80 rows, 458/519 checks20/20 rows, 115/115 checks20/20 rows, 115/115 checksBest practical deployment path when strict validators are available.
Distill Vapol Q4KM GGUFportable artifactintegrity verifiedintegrity verifiedQuantized release for LM Studio/llama.cpp; published as chunks and reassembled into one file locally. The PEFT adapter is the canonical highest-fidelity artifact.

Relative local improvement over the original ALIA instruct model on the visible assistant eval:

  • Row pass rate: 21/80 -> 33/80, a +57.1% relative increase.
  • Check pass rate: 386/519 -> 446/519, a +15.5% relative increase.
  • With deterministic runtime repair: 21/80 -> 41/80 rows, a +95.2% relative increase.

Official Reference Scores

The official BSC model cards report broad benchmark numbers for the source models. These are reference points, not direct comparisons to the local task evals above.

Sources:

Selected official BSC-LT/ALIA-40b-instruct-2601 reference scores:

AreaBenchmarkOfficial score
English knowledgeMMLU0.45
English reasoningARC Challenge0.40
English reasoningARC Easy0.73
English readingBelebele English0.77
English commonsenseHellaSwag acc0.54
Spanish knowledgeMMMLU Spanish0.41
Spanish readingBelebele Spanish0.72
Catalan readingBelebele Catalan0.71
Basque readingBelebele Basque0.67
Galician readingBelebele Galician0.73

Estimated academic benchmark movement should be treated conservatively. The post-training targeted assistant reliability, formats, tool/RAG behavior, and multilingual task compliance; it should not be expected to dramatically change broad pretrained knowledge benchmarks such as MMLU.

Notes

  • The adapter is the highest-fidelity Hub artifact.
  • The Q4KM GGUF is the recommended portable local artifact; the Hub copy is chunked for reliable transport and reconstructs to one GGUF file.
  • The optional runtime repair helper is not embedded in the GGUF; it is a deployment-side deterministic layer for strict formal outputs.
  • For practical GGUF inference, use LM Studio or a CUDA-enabled llama.cpp build with GPU offload.