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 architecture config (max_loops=16 table capacity, run at 8)
Browse files- config.json +32 -0
config.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"vocab_size": 4096,
|
| 3 |
+
"dim": 96,
|
| 4 |
+
"n_heads": 8,
|
| 5 |
+
"prelude_layers": 0,
|
| 6 |
+
"coda_layers": 1,
|
| 7 |
+
"shared_loops": 16,
|
| 8 |
+
"lora_rank": 4,
|
| 9 |
+
"ffn_hidden": 2112,
|
| 10 |
+
"max_seq_len": 4096,
|
| 11 |
+
"max_context_len": 8192,
|
| 12 |
+
"rope_base": 10000.0,
|
| 13 |
+
"index_dim": 16,
|
| 14 |
+
"index_top_k": 128,
|
| 15 |
+
"local_window": 64,
|
| 16 |
+
"sparse_chunk_threshold": 4096,
|
| 17 |
+
"sparse_chunk_queries": 1024,
|
| 18 |
+
"ssa_block_size": 64,
|
| 19 |
+
"ssa_top_k_blocks": 8,
|
| 20 |
+
"attention_window": 256,
|
| 21 |
+
"fp4_weights": false,
|
| 22 |
+
"thinking_enabled": false,
|
| 23 |
+
"thinking_steps_min": 0,
|
| 24 |
+
"thinking_steps_max": 0,
|
| 25 |
+
"thinking_loss_weight": 0.0,
|
| 26 |
+
"moe_experts_per_layer": 0,
|
| 27 |
+
"moe_expert_hidden": 0,
|
| 28 |
+
"moe_hot_experts": 0,
|
| 29 |
+
"moe_capacity_factor": 1.5,
|
| 30 |
+
"moe_seed": 0,
|
| 31 |
+
"max_loops": 16
|
| 32 |
+
}
|