Nicu 20M β€” a Sicilian character AI that runs in your browser

Nicu is a 20M-parameter language model trained from scratch (no pretrained base) that plays a single character: a friendly guy from Catania, Sicily. He knows his small world β€” the sea, the grill, his friends, Sant'Agata β€” and deflects instead of hallucinating on everything else. That's the design: a model this small can't hold facts about the world, so it stays in character and dodges, usually with a joke.

Try it live: nicu.chat β€” the model runs entirely on your device (ONNX Runtime Web, WASM). No inference server.

This is the v1.0 release, part of a three-size family trained on the same final corpus for size-scaling comparison: nicu-5m Β· nicu-9m Β· nicu-20m

How it was made

A large teacher LLM generated ~565k synthetic in-character dialogues from a "character sheet" (identity, voice, boundaries). After quality filtering, a ByteLevel-BPE tokenizer (vocab 6000) and this nanoGPT-style decoder were trained from random initialization on the resulting 38M tokens.

Architecture

Parameters 20.6M
Layers / heads / embd 15 / 8 / 320
Vocab 6,000 (ByteLevel BPE)
Context 512 tokens
Precision fp32 (+ dynamic-int8 ONNX)

Evaluation

Blind LLM-judge over a 204-case character-fidelity suite (identity, substance, multi-turn coherence, boundary handling): 69.6% case pass rate. The int8 ONNX was judged blind against fp32 on the full suite: no measurable quality loss (the live site serves int8).

Files

  • model.onnx β€” fp32 ONNX export (opset 17), for onnxruntime-web/onnxruntime
  • model.int8.onnx β€” dynamic-int8 quantized ONNX (what nicu.chat serves)
  • tokenizer.json β€” ByteLevel BPE tokenizer (HF tokenizers format)
  • checkpoint.pt β€” PyTorch weights + config ({'model_state', 'cfg', ...})

Prompt format

Plain dialogue text, no special tokens beyond <|endoftext|> (id 0):

Utente: Ciao Nicu! Chi sei?
Nicu:

Sample with repetition penalty ~1.15 (current turn only), temperature 1.0, top-p 0.92; stop on <|endoftext|> or on a generated \nUtente: / \nNicu: line.

Versions

  • v1.0 (current) β€” retrained from scratch on the final corpus; family of three sizes (5M / 9M / 20M); int8 ONNX included.
  • v0.9 β€” first public release (20M only).

Limitations

  • Italian only, heavily flavored with Catania dialect and running gags.
  • Not factual, not a task assistant β€” an entertainment character.
  • Out-of-domain questions get in-character deflections by design.
  • Short conversational memory (context 512); factual recall of user details across turns is weak in this generation.

Links

License

Weights: CC-BY-NC-4.0 (non-commercial). Contact the author for other uses.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Space using federico-anastasi/nicu-20m 1

Collection including federico-anastasi/nicu-20m