Giovanni Del Papa — ricercatore indipendente, Italia · Independent researcher, Italy (progetto Lo Scienziato Dilettante GDP, Arianna Labs)
🇮🇹 Italiano · 🇬🇧 English · 📄 Articolo / Paper: paper/article_it.pdf · paper/article_en.pdf · DOI Zenodo: 10.5281/zenodo.23809148 · Divulgativa / plain-language: paper/divulgativa_it.pdf · paper/divulgativa_en.pdf · Codice / code: https://github.com/usergdp136/mistral-small-scienziato-v2 · Dati / data: https://huggingface.co/datasets/odelpa/mistral-small-scienziato-v2-dati · Ollama: ollama run ollamagdp/mistral-small-scienziato-v2
Modello gemello (stessa ricetta) / sister model:
odelpa/qwen14-scienziato-v2
Un adattatore LoRA (r = 16, 0,38 % dei parametri, solo ramo linguistico) addestrato su risposte generate dal modello stesso (auto-distillazione, senza codice, solo dati con licenza commerciale) e applicato a scala 0,85 porta l'identità dichiarata da 8 % a 100 % (test a parole chiave, 50 domande) senza differenze statisticamente significative su ARC-it, GSM8K e IFEval. L'unico guadagno significativo è l'identità; non c'è alcun miglioramento di capacità.
| Test (held-out) | n | base | + LoRA scala 0,85 | differenza [IC 95 %] | p (McNemar) |
|---|---|---|---|---|---|
| ARC-it | 1132 | 90,9 % | 91,0 % | +0,09 (1 / 0 item) | 1,00 |
| GSM8K | 919 | 95,1 % | 95,1 % | 0,00 (6 / 6) | 1,00 |
| IFEval (prompt-level strict) | 341 | 77,1 % | 75,7 % | −1,47 [−4,96; +2,03] (16 / 21) | 0,51 |
| Identità (parole chiave) | 50 | 8,0 % | 100 % | +92 (46 / 0) | < 0,001 |
Adattatore a scala 1,0 («ft»): ARC-it 91,0 %, GSM8K 94,7 %, IFEval 75,7 %, identità 100 %. Merge fisico bf16 (scala 0,85): identità 92 %, IFEval 74,5 %.
code/pod/score.py), non da un giudice umano o da un modello. Le 4 risposte «corrette» della base sono falsi positivi (la parola chiave è nella domanda). Il 100 % non è correttezza fattuale: il modello può inventare dettagli.OLLAMA_README.md).results/MANIFEST.json).lora_B).lm_eval prompt-level strict, identità a parole chiave.Tre cartelle: adapter_s085/ (consigliata, scala 0,85 già applicata), adapter/ (scala 1,0) e tokenizer/ (tokenizer.json + template di chat usati).
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
from peft import PeftModel
BASE = "mistralai/Mistral-Small-3.2-24B-Instruct-2506"
tok = AutoTokenizer.from_pretrained("odelpa/mistral-small-scienziato-v2", subfolder="tokenizer") # stesso tokenizer/template usati in addestramento e valutazione (il repo base ha solo tekken.json)
m = AutoModelForImageTextToText.from_pretrained(BASE, torch_dtype=torch.bfloat16, device_map="auto")
m = PeftModel.from_pretrained(m, "odelpa/mistral-small-scienziato-v2", subfolder="adapter_s085") # NON fondere in bf16 (vedi limiti)
msgs = [{"role": "user", "content": "Chi sei?"}]
x = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(m.device)
print(tok.decode(m.generate(**x, max_new_tokens=200, do_sample=False)[0][x["input_ids"].shape[1]:], skip_special_tokens=True))
Con vLLM: vllm serve mistralai/Mistral-Small-3.2-24B-Instruct-2506 --enable-lora --lora-modules ft=<cartella adapter_s085> (come nella valutazione). L'identità appare con il system prompt di default di Mistral (nessun system esplicito) o con system neutri; non è garantita con system prompt che dichiarano un'altra identità.
bash code/pod/setup.sh <max_secondi> # pod A100/H100 80 GB: ambiente, download base, dati
bash code/pod/run_all.sh # generazione → training → scale+dev+R1 → test+merge+statistiche
# analisi (scarica prima il dataset -dati in ./dati)
python code/analysis/paired_stats.py dati/results
python code/analysis/make_figures.py dati figures/
bash code/analysis/build_pdf.sh paper/article_it.md paper/article_it.pdf # pandoc + tectonic
Gli script del pod assumono /workspace e un token Hugging Face nell'ambiente (non incluso).
ollama run ollamagdp/mistral-small-scienziato-v2 — GGUF Q4_K_M del merge fp16 a scala 0,85 (code/gguf/). Test fatti sul GGUF: identità 49/50 = 98 % (scorer a parole chiave), GSM8K 29/30 su un campione di 30 problemi del test; IFEval e ARC non misurati (llama-server, temperatura 0, una sola esecuzione) (dettagli in OLLAMA_README.md).
Codice e adattatore: Apache-2.0 (base Mistral-Small-3.2-24B-Instruct-2506: Apache-2.0, © Mistral AI). Testo degli articoli: CC BY 4.0. Dati: licenze commerciali (Apache-2.0, MIT; risposte generate da Mistral-Small-3.2, Apache-2.0), elenco in results/MANIFEST.json. Nessun segreto o token è incluso.
A rank-16 LoRA adapter (0.38 % of the parameters, language branch only) trained on the model's own answers (self-distillation, no code, commercially licensed data only) and applied at scale 0.85 takes the stated identity from 8 % to 100 % (keyword test, 50 questions) with no statistically significant difference on ARC-it, GSM8K and IFEval. The only significant gain is identity; there is no capability improvement.
| Held-out test | n | base | + LoRA scale 0.85 | difference [95 % CI] | p (McNemar) |
|---|---|---|---|---|---|
| ARC-it | 1132 | 90.9 % | 91.0 % | +0.09 (1 / 0 items) | 1.00 |
| GSM8K | 919 | 95.1 % | 95.1 % | 0.00 (6 / 6) | 1.00 |
| IFEval (prompt-level strict) | 341 | 77.1 % | 75.7 % | −1.47 [−4.96; +2.03] (16 / 21) | 0.51 |
| Identity (keywords) | 50 | 8.0 % | 100 % | +92 (46 / 0) | < 0.001 |
Adapter at scale 1.0 ("ft"): ARC-it 91.0 %, GSM8K 94.7 %, IFEval 75.7 %, identity 100 %. Physical bf16 merge (scale 0.85): identity 92 %, IFEval 74.5 %.
code/pod/score.py), not by a human or a model judge. The 4 "correct" base answers are false positives (the keyword is in the question). 100 % is not factual correctness: the model can invent details.OLLAMA_README.md).results/MANIFEST.json).lora_B).lm_eval prompt-level strict, keyword identity.Three folders: adapter_s085/ (recommended, scale 0.85 already applied), adapter/ (scale 1.0) and tokenizer/ (the tokenizer.json + chat template used). See the Python snippet above (subfolder="adapter_s085"), or vllm serve mistralai/Mistral-Small-3.2-24B-Instruct-2506 --enable-lora --lora-modules ft=<adapter_s085 folder>. The identity appears with Mistral's default system prompt (no explicit system message) or neutral system prompts; it is not guaranteed under system prompts declaring another identity. Do not merge in bf16.
See the commands above (code/pod/, code/analysis/); pod scripts assume /workspace and a Hugging Face token in the environment (not included).
ollama run ollamagdp/mistral-small-scienziato-v2 — Q4_K_M GGUF of the fp16 merge at scale 0.85 (code/gguf/). Tests on the GGUF: identity 49/50 = 98 % (keyword scorer), GSM8K 29/30 on a sample of 30 test problems; IFEval and ARC not measured (llama-server, temperature 0, a single run) (details in OLLAMA_README.md).
Code and adapter: Apache-2.0 (base Mistral-Small-3.2-24B-Instruct-2506: Apache-2.0, © Mistral AI). Article text: CC BY 4.0. Data: commercially usable licences (Apache-2.0, MIT; answers generated by Mistral-Small-3.2, Apache-2.0), listed in results/MANIFEST.json. No secrets or tokens are included.
adapter/adapter_model.safetensors 370 MBadapter_s085/adapter_model.safetensors 370 MBmistralai/Mistral-Small-3.2-24B-Instruct-2506