AILO-152M-x3 β€” self-elaborating tiny LLM

Same 152M weights as AILO-152M-v2, a different way of answering. Instead of a single forward pass, x3 runs the network in a short internal loop: it drafts an answer, re-reads its own answer, then continues and adds another aspect β€” for n_passes rounds. The result is a longer, more exhaustive answer than a 152M model produces in one shot.

Everything happens inside the model: identical weights to v2, only the generation procedure is looped. No external orchestration.

What it is (and isn't) β€” honest

  • βœ… More exhaustive: covers more sub-aspects, finishes truncated thoughts, ~2–3Γ— longer answers.
  • βœ… Self-contained: one model, one call. The loop lives in generate.
  • ⚠️ Each token is still 152M-quality: facts can be imperfect, and long loops may repeat. x3 widens the answer, it does not turn a 152M into a 1B.
  • ⚠️ Strongest in English; Italian is weaker (base-model limit).

Usage (Transformers)

from transformers import AutoModelForCausalLM, GPT2TokenizerFast
import huggingface_hub as hh

d = hh.snapshot_download("xxrickyxx/Ailo152m-x3")
tok = GPT2TokenizerFast(vocab_file=f"{d}/vocab.json", merges_file=f"{d}/merges.txt")
model = AutoModelForCausalLM.from_pretrained(d, trust_remote_code=True).eval()

print(model.chat("What is a black hole?", tok, n_passes=3, tokens_per_pass=140))

chat() applies the chat template and runs the loop. Knobs: n_passes (loop rounds), tokens_per_pass, temperature (0.3), top_k (20), top_p (0.9), repeat_penalty (1.3).

Code Librarian πŸ“š (new)

A 152M model cannot write reliable code token-by-token β€” and this one refuses to hallucinate pseudo-code. Instead, it ships with a library of complete, tested programs (code_templates/): ask for code and the model understands the request and hands you the right full program; ask for something outside the library and it honestly says so, listing what it has.

print(model.chat("write a python script to manage a library with a GUI", tok))
# -> complete, working Tkinter+SQLite Library Manager (add/search/loan/return)

Current library: Library Manager (Tkinter+SQLite), To-Do List (Tkinter+JSON), Calculator (Tkinter, safe eval). Every program is verified and runs as-is. Knowledge on disk, understanding in the network.

How the loop works

  1. Pass 1 β€” draft answer to <|user|>\n{q}\n<|assistant|>\n.
  2. Passes 2..N β€” re-feed the question + answer-so-far + an internal elaboration cue ("continue / another aspect / add an example"), generate more, append.
  3. A word-overlap guard stops early if a pass just repeats itself.

Ollama / GGUF

GGUF + llama.cpp run plain autoregressive generation and cannot execute the Python loop. An Ollama build exists as a thorough single-pass approximation (high num_predict + repeat penalty) β€” not the real loop:

ollama run Alieno/ailo-152m-x3

The true multi-pass loop is a Transformers (trust_remote_code) feature of this repo.

Attribution & license

  • Architecture, AILO model and the x3 loop: the author's work.
  • License: CC BY-NC-SA 4.0.
  • AILO-152M-v2 was distilled from Gemma 3 4B; see the v2 card for details.
Downloads last month
62
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for xxrickyxx/Ailo152m-x3

Finetuned
(1)
this model