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 (corrected training numbers + known limitation)
#1
by Compactbot - opened
README.md
CHANGED
|
@@ -6,6 +6,7 @@ library_name: transformers
|
|
| 6 |
pipeline_tag: text-generation
|
| 7 |
tags:
|
| 8 |
- tiny
|
|
|
|
| 9 |
- slm
|
| 10 |
- small-language-model
|
| 11 |
- sub-1m
|
|
@@ -13,7 +14,6 @@ tags:
|
|
| 13 |
- character
|
| 14 |
- tsundere
|
| 15 |
- fine-tune
|
| 16 |
-
- from-scratch
|
| 17 |
base_model: Glint-Research/Glint-2
|
| 18 |
metrics:
|
| 19 |
- coherence
|
|
@@ -33,7 +33,7 @@ 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
|
|
@@ -61,17 +61,30 @@ One shared transformer block, **looped 8 times**, with a tiny per-loop LoRA
|
|
| 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 |
-
-
|
| 66 |
-
|
|
|
|
| 67 |
- **Device:** NVIDIA RTX 5090 (32 GB).
|
| 68 |
-
- **Ship gate:** 10 fresh greedy samples — **0/10 degenerate**
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
> **No validation-loss number is reported on purpose.** The trainer
|
| 72 |
-
>
|
| 73 |
-
>
|
| 74 |
-
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
## Sample (greedy, from the published weights)
|
| 77 |
|
|
|
|
| 6 |
pipeline_tag: text-generation
|
| 7 |
tags:
|
| 8 |
- tiny
|
| 9 |
+
- tiny-lm
|
| 10 |
- slm
|
| 11 |
- small-language-model
|
| 12 |
- sub-1m
|
|
|
|
| 14 |
- character
|
| 15 |
- tsundere
|
| 16 |
- fine-tune
|
|
|
|
| 17 |
base_model: Glint-Research/Glint-2
|
| 18 |
metrics:
|
| 19 |
- coherence
|
|
|
|
| 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
|
|
|
|
| 61 |
## Training
|
| 62 |
|
| 63 |
- **Data:** a 216,144-byte / 3,933-line tsundere-catgirl persona corpus
|
| 64 |
+
(User:/Cat: dialogue in the target voice) = **82,695 tokens** with the
|
| 65 |
+
Glint-2 BPE tokenizer, packed into 323 sequences of 256.
|
| 66 |
+
- **Run:** 2000 steps, batch 8, seq 256, lr 2e-4, cosine decay with 10% warmup
|
| 67 |
+
(≈ 662k tokens seen).
|
| 68 |
- **Device:** NVIDIA RTX 5090 (32 GB).
|
| 69 |
+
- **Ship gate:** 10 fresh greedy samples — **0/10 degenerate** by the
|
| 70 |
+
6-word-ngram detector, all in-voice.
|
| 71 |
+
|
| 72 |
+
> **No validation-loss number is reported on purpose.** The trainer produced
|
| 73 |
+
> no finite held-out val loss for this run (`best_val` stayed `inf`), so there
|
| 74 |
+
> is no real held-out number to quote. Quality is judged by the samples, not by
|
| 75 |
+
> a val loss.
|
| 76 |
+
|
| 77 |
+
## Known limitation (honest)
|
| 78 |
+
|
| 79 |
+
The corpus is built around a small set of "User:" turn templates — most
|
| 80 |
+
prominently *"you're asking me to [verb]"*, which appears ~696 times across
|
| 81 |
+
only ~8 distinct verbs (purr, stay, nap, sit, meow, help, play, come). The
|
| 82 |
+
model faithfully learned this: in free generation it tends to **echo that
|
| 83 |
+
template in the User turns** (with different verbs), even when the prompt did
|
| 84 |
+
not contain it. The **Cat replies are varied and on-persona**; the template
|
| 85 |
+
locking is in the User side. As a "give it a User line, get a tsundere Cat
|
| 86 |
+
reply" persona model it works well; as an open-ended generator it leans on the
|
| 87 |
+
template. A larger, more diverse corpus would fix this.
|
| 88 |
|
| 89 |
## Sample (greedy, from the published weights)
|
| 90 |
|