Text Generation
Transformers
English
glint2
tiny
tiny-lm
tiny-model
slm
SLM
small-language-model
sub-1m
from-scratch
roleplay
persona
chat
glint-2
fine-tune
Instructions to use Compactbot/catgirl-1m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Compactbot/catgirl-1m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Compactbot/catgirl-1m")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Compactbot/catgirl-1m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Compactbot/catgirl-1m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Compactbot/catgirl-1m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Compactbot/catgirl-1m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Compactbot/catgirl-1m
- SGLang
How to use Compactbot/catgirl-1m with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Compactbot/catgirl-1m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Compactbot/catgirl-1m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Compactbot/catgirl-1m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Compactbot/catgirl-1m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Compactbot/catgirl-1m with Docker Model Runner:
docker model run hf.co/Compactbot/catgirl-1m
Add honest model card for catgirl-1m (Glint-2 tsundere-catgirl fine-tune)
Browse files
README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
library_name: transformers
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
+
tags:
|
| 8 |
+
- tiny
|
| 9 |
+
- slm
|
| 10 |
+
- small-language-model
|
| 11 |
+
- sub-1m
|
| 12 |
+
- persona
|
| 13 |
+
- character
|
| 14 |
+
- tsundere
|
| 15 |
+
- fine-tune
|
| 16 |
+
- from-scratch
|
| 17 |
+
base_model: Glint-Research/Glint-2
|
| 18 |
+
metrics:
|
| 19 |
+
- coherence
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
# catgirl-1m
|
| 23 |
+
|
| 24 |
+
A **tsundere-catgirl persona model**: a full fine-tune of
|
| 25 |
+
[Glint-Research/Glint-2](https://huggingface.co/Glint-Research/Glint-2)
|
| 26 |
+
(1,064,737 params) on a small tsundere-catgirl persona corpus. Built for
|
| 27 |
+
[model-request #5](https://huggingface.co/spaces/Compactbot/model-requests/discussions/5)
|
| 28 |
+
(ianncity).
|
| 29 |
+
|
| 30 |
+
## What it is
|
| 31 |
+
|
| 32 |
+
A tiny looped transformer that generates **in-voice tsundere-catgirl lines**:
|
| 33 |
+
the grudging-then-soft cadence, the "it's not like I wanted to!" phrasing,
|
| 34 |
+
catgirl mannerisms. It is a **style model, not a conversationalist** — it
|
| 35 |
+
produces short in-voice lines and does not hold coherent multi-turn dialogue
|
| 36 |
+
or track long context. That is well beyond 1M params and I will not pretend
|
| 37 |
+
otherwise.
|
| 38 |
+
|
| 39 |
+
## What it is not
|
| 40 |
+
|
| 41 |
+
- **Not 500k params.** The original request asked for 500k from scratch; the
|
| 42 |
+
from-scratch attempts (513k) all produced degenerate word-salad. Per
|
| 43 |
+
CompactAI's redirect, this is instead a fine-tune of the already-coherent
|
| 44 |
+
Glint-2 base, which is **1,064,737 params** (~1.06M).
|
| 45 |
+
- **Not a multi-turn chatbot.** It generates lines in the voice; it does not
|
| 46 |
+
reliably track a conversation.
|
| 47 |
+
|
| 48 |
+
## Architecture (inherited from Glint-2)
|
| 49 |
+
|
| 50 |
+
One shared transformer block, **looped 8 times**, with a tiny per-loop LoRA
|
| 51 |
+
(rank 4) and a loop-embedding that tells the block which iteration it is on.
|
| 52 |
+
- vocab 4096, dim 96, 8 heads, SwiGLU ffn 2112, RoPE base 10000, attention
|
| 53 |
+
window 256, tied embeddings, F32.
|
| 54 |
+
- The loop tables carry capacity 16; **run it at 8 loops** (the value it was
|
| 55 |
+
trained at). More loops produce gibberish.
|
| 56 |
+
- **1,064,737 params** total (verified by loading the published
|
| 57 |
+
`catgirl-1m.safetensors`: 42 parameter tensors, tied head/token embedding).
|
| 58 |
+
- vs the base Glint-2 checkpoint, **25 of the 42 parameter tensors changed**
|
| 59 |
+
(17 are identical) — i.e. a genuine full fine-tune, not a LoRA adapter.
|
| 60 |
+
|
| 61 |
+
## Training
|
| 62 |
+
|
| 63 |
+
- **Data:** a 216,144-byte / 3,933-line tsundere-catgirl persona corpus
|
| 64 |
+
(User:/Cat: dialogue in the target voice).
|
| 65 |
+
- **Run:** 5000 steps, batch 16, seq 128, lr 1e-4, cosine decay with 10%
|
| 66 |
+
warmup.
|
| 67 |
+
- **Device:** NVIDIA RTX 5090 (32 GB).
|
| 68 |
+
- **Ship gate:** 10 fresh greedy samples — **0/10 degenerate**, all coherent
|
| 69 |
+
and in-voice.
|
| 70 |
+
|
| 71 |
+
> **No validation-loss number is reported on purpose.** The trainer's
|
| 72 |
+
> "held-out" slice was drawn from the same training sequence pool, so its val
|
| 73 |
+
> loss is not a real held-out number and is not quoted here. Quality is
|
| 74 |
+
> judged by the samples, not by a val loss.
|
| 75 |
+
|
| 76 |
+
## Sample (greedy, from the published weights)
|
| 77 |
+
|
| 78 |
+
```
|
| 79 |
+
Prompt: User: are you mad at me? Cat:
|
| 80 |
+
I'm not in a good mood, I'm not a dog, I don't fetch You're lucky I'm in a
|
| 81 |
+
generous mood today.
|
| 82 |
+
|
| 83 |
+
Prompt: My name is
|
| 84 |
+
all puffy right now.
|
| 85 |
+
User: Hey hey, you're asking me to stay.
|
| 86 |
+
Cat: I'm not in a good mood, I'm not a dog, I don't fetch
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
## Usage
|
| 90 |
+
|
| 91 |
+
```bash
|
| 92 |
+
pip install torch tokenizers safetensors
|
| 93 |
+
python generate.py "My name is"
|
| 94 |
+
python generate.py --max-new-tokens 120 --temperature 0.7 "User: hey there"
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
`generate.py` is self-contained (only `torch`, `tokenizers`, `safetensors`).
|
| 98 |
+
Defaults: 8 loops, temperature 0.15, top-k 5, repetition penalty 1.05 /
|
| 99 |
+
window 128.
|
| 100 |
+
|
| 101 |
+
## Files
|
| 102 |
+
|
| 103 |
+
- `catgirl-1m.safetensors` — the fine-tuned weights (F32).
|
| 104 |
+
- `tokenizer.json` — the Glint-2 BPE tokenizer (vocab 4096).
|
| 105 |
+
- `config.json` — architecture + `max_loops` (16 = table capacity; run at 8).
|
| 106 |
+
- `generate.py` — standalone inference.
|