Instructions to use RaphGonz/nunda-a1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use RaphGonz/nunda-a1 with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Nunda A1 — citation model on SmolLM2-360M with relational attention
Code: https://github.com/RaphGonz/Nunda (needed to load and run the models, and to rebuild the data).
LoRA (rank 16) on SmolLM2-360M, plus new heads (lexicon, pointers, selection), new token vectors and
a learned relational attention bias δ (one value per layer, head and relation between propositions).
The model answers by citing propositions of a case file: its output is a sequence of actions
(P:7 ET P:12 FIN, ABSTENTION, CONFLIT … FIN_CONFLIT) decoded under a grammar mask, never free
text. Inputs are anonymized: names become slots (⟨PER 3⟩), numbers and dates are kept.
Starts from A0 (nunda-a0): [REL] header removed, δ added at zero, 2 epochs.
Results (validation)
| Model | F1 level-0 synthetic | Abstention | F1 HotpotQA (distractor) | Wrong abstentions (HotpotQA) |
|---|---|---|---|---|
| A0 | 0.864 | 0.978 | 0.676 | 14.6 % |
| A1 | 0.872 | 0.989 | 0.748 | 4.3 % |
B-S (nunda-b-s) |
0.845 | 0.950 | 0.769 | 2.4 % |
827 synthetic examples (inputs ≤ 2,500 tokens), 999 HotpotQA. Details in eval/.
Files
model.safetensors: trained weights only (LoRA, heads, new vectors, δ); load them on top of
HuggingFaceTB/SmolLM2-360M with the project's code. Configurations in configs/.
Training data
Synthetic case files (40 %), HotpotQA (20 %), PIAF (15 %), questions on French law generated by Qwen2.5-7B-Instruct from LEGI (15 %), FinQA (5 %), SQuAD 2.0 (5 %). One RTX 3090.
Licence
CC BY-SA 4.0 (HotpotQA, SQuAD 2.0 and PIAF are CC BY-SA). Base model: SmolLM2-360M, Apache 2.0. Attribution: HotpotQA (Yang et al., 2018); SQuAD 2.0 (Rajpurkar et al., 2018); PIAF (Etalab, 2020); FinQA (Chen et al., 2021, MIT); LEGI (DILA, Licence Ouverte 2.0).
- Downloads last month
- -
Model tree for RaphGonz/nunda-a1
Base model
HuggingFaceTB/SmolLM2-360M