Text Generation
Transformers
Safetensors
English
looped_transformer
looped-transformer
muon-optimizer
cot
story-generation
small-model
experimental
Instructions to use Gugu8/Atom-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Gugu8/Atom-1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Gugu8/Atom-1")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Gugu8/Atom-1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Gugu8/Atom-1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Gugu8/Atom-1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Gugu8/Atom-1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Gugu8/Atom-1
- SGLang
How to use Gugu8/Atom-1 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 "Gugu8/Atom-1" \ --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": "Gugu8/Atom-1", "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 "Gugu8/Atom-1" \ --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": "Gugu8/Atom-1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Gugu8/Atom-1 with Docker Model Runner:
docker model run hf.co/Gugu8/Atom-1
Upload 5 files
Browse files- .gitattributes +1 -0
- config.json +28 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- tok_corpus.txt +3 -0
- vocab.json +0 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tok_corpus.txt filter=lfs diff=lfs merge=lfs -text
|
config.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architecture": "LoopedTransformer",
|
| 3 |
+
"seq_len": 256,
|
| 4 |
+
"vocab_size": 16384,
|
| 5 |
+
"d_model": 736,
|
| 6 |
+
"n_heads": 8,
|
| 7 |
+
"d_ff": 1472,
|
| 8 |
+
"dropout": 0.05,
|
| 9 |
+
"mtp_depth": 1,
|
| 10 |
+
"mtp_lambda": 0.3,
|
| 11 |
+
"min_loops": 2,
|
| 12 |
+
"max_loops": 8,
|
| 13 |
+
"eval_loops": 6,
|
| 14 |
+
"tokenizer_dir": "tokenizer",
|
| 15 |
+
"special_tokens": {
|
| 16 |
+
"pad_id": 0,
|
| 17 |
+
"bos_id": 1,
|
| 18 |
+
"eos_id": 2
|
| 19 |
+
},
|
| 20 |
+
"total_params": 24176128,
|
| 21 |
+
"tied_weights": [
|
| 22 |
+
{
|
| 23 |
+
"kept": "tok_emb.weight",
|
| 24 |
+
"dropped": "head.weight"
|
| 25 |
+
}
|
| 26 |
+
],
|
| 27 |
+
"notes": "Custom looped-transformer architecture (shared CoreBlock iterated min_loops-max_loops times) with MTP auxiliary head, trained with the Muon optimizer. NOT a GGUF/llama.cpp-compatible architecture -- load with this repo's LoopedTransformer class + safetensors.torch.load_file(), not with llama.cpp or similar. IMPORTANT: 'tied_weights' above lists parameter pairs that share the same underlying tensor in the original model (weight tying) and were de-duplicated for safetensors export (which refuses to save aliased tensors). After loading, manually re-tie them, e.g. for the default case: model.head.weight = model.tok_emb.weight -- do this BEFORE calling load_state_dict with strict=True, or load with strict=False and assign the tied tensor afterward."
|
| 28 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b8cc15b3c1cd60be213630eaf422cc66b02e1d58f7fc880cd310fc29f6ff739e
|
| 3 |
+
size 96707128
|
tok_corpus.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:21879315a997c9e728731124f45c96099a5b516f926fd0260b14c64765b15e0b
|
| 3 |
+
size 181468126
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|