Transformers
Safetensors
English
charlm
tiny
tiny-lm
small-language-model
sub-1m
char-level
from-scratch
nanoGPT
TinyStories
Instructions to use Compactbot/char-gpt-1.2m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Compactbot/char-gpt-1.2m with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import CharGPT model = CharGPT.from_pretrained("Compactbot/char-gpt-1.2m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Fix config: lm_head is NOT tied (checkpoint stores two distinct 65x128 tensors; model.py never ties). Set tie_word_embeddings=false to match the artifact.
ea61a00 verified Download config.json from Compactbot/char-gpt-1.2m: direct link, hf CLI and curl.
- Browser
- Download file 240 Bytes
-
https://huggingface.co/Compactbot/char-gpt-1.2m/resolve/main/config.json
- Command line
-
hf download hf://Compactbot/char-gpt-1.2m/config.json
-
curl -L -o config.json https://huggingface.co/Compactbot/char-gpt-1.2m/resolve/main/config.json
240 Bytes
| { | |
| "architectures": [ | |
| "CharGPT" | |
| ], | |
| "model_type": "charlm", | |
| "vocab_size": 65, | |
| "block_size": 128, | |
| "n_layer": 6, | |
| "n_head": 4, | |
| "n_embd": 128, | |
| "tie_word_embeddings": false, | |
| "n_params": 1216000, | |
| "torch_dtype": "float32" | |
| } |