Text Generation
Transformers
Safetensors
English
llama
assistant
chat
general-purpose
smollm2
tiny
efficient
tinymodels
conversational
text-generation-inference
Instructions to use TinyModels/Atom-350M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TinyModels/Atom-350M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TinyModels/Atom-350M") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TinyModels/Atom-350M") model = AutoModelForCausalLM.from_pretrained("TinyModels/Atom-350M") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use TinyModels/Atom-350M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TinyModels/Atom-350M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TinyModels/Atom-350M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TinyModels/Atom-350M
- SGLang
How to use TinyModels/Atom-350M 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 "TinyModels/Atom-350M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TinyModels/Atom-350M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "TinyModels/Atom-350M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TinyModels/Atom-350M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TinyModels/Atom-350M with Docker Model Runner:
docker model run hf.co/TinyModels/Atom-350M
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- assistant
|
| 7 |
+
- chat
|
| 8 |
+
- general-purpose
|
| 9 |
+
- smollm2
|
| 10 |
+
- tiny
|
| 11 |
+
- efficient
|
| 12 |
+
- tinymodels
|
| 13 |
+
pipeline_tag: text-generation
|
| 14 |
+
library_name: transformers
|
| 15 |
+
---
|
| 16 |
+
<p align="center">
|
| 17 |
+
<img src="https://huggingface.co/spaces/SpiceeChat/README/resolve/main/SpiceeChat_org_logo.png" alt="SpiceeChat Logo" width="80" style="border-radius:50%; margin-bottom:-20px;">
|
| 18 |
+
</p>
|
| 19 |
+
|
| 20 |
+
<div align="center">
|
| 21 |
+
<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" style="animation: float 4s ease-in-out infinite;">
|
| 22 |
+
<circle cx="50" cy="50" r="45" fill="none" stroke="url(#grad1)" stroke-width="3"/>
|
| 23 |
+
<circle cx="50" cy="50" r="30" fill="none" stroke="url(#grad2)" stroke-width="2" stroke-dasharray="8,6"/>
|
| 24 |
+
<circle cx="50" cy="50" r="12" fill="url(#grad3)"/>
|
| 25 |
+
<defs>
|
| 26 |
+
<linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%">
|
| 27 |
+
<stop offset="0%" style="stop-color:#ff0080;stop-opacity:1" />
|
| 28 |
+
<stop offset="100%" style="stop-color:#7928ca;stop-opacity:1" />
|
| 29 |
+
</linearGradient>
|
| 30 |
+
<linearGradient id="grad2" x1="100%" y1="0%" x2="0%" y2="100%">
|
| 31 |
+
<stop offset="0%" style="stop-color:#7928ca;stop-opacity:1" />
|
| 32 |
+
<stop offset="100%" style="stop-color:#ff0080;stop-opacity:1" />
|
| 33 |
+
</linearGradient>
|
| 34 |
+
<radialGradient id="grad3" cx="30%" cy="30%" r="70%">
|
| 35 |
+
<stop offset="0%" style="stop-color:#ff0080;stop-opacity:1" />
|
| 36 |
+
<stop offset="100%" style="stop-color:#7928ca;stop-opacity:1" />
|
| 37 |
+
</radialGradient>
|
| 38 |
+
</defs>
|
| 39 |
+
</svg>
|
| 40 |
+
</div>
|
| 41 |
+
|
| 42 |
+
<h1 align="center" style="font-family: 'Orbitron', sans-serif; font-size: 3rem; letter-spacing: 2px; margin-top: 10px; background: linear-gradient(135deg, #ff0080, #7928ca); -webkit-background-clip: text; -webkit-text-fill-color: transparent;">ATOM‑350M</h1>
|
| 43 |
+
<p align="center" style="font-family: 'Rajdhani', sans-serif; font-size: 1.5rem; color: #b0b0b0; margin-top: -10px;">Tiny models, <strong style="color: #ff0080;">big</strong> ideas.</p>
|
| 44 |
+
|
| 45 |
+
<div align="center" style="margin: 30px 0;">
|
| 46 |
+
<span style="background: rgba(255,0,128,0.1); border: 1px solid rgba(255,0,128,0.3); border-radius: 50px; padding: 6px 20px; font-family: 'Rajdhani', sans-serif; font-weight: 600; font-size: 0.9rem; color: #ff0080; letter-spacing: 1px;">
|
| 47 |
+
⚡ BUILT BY TINYMODELS
|
| 48 |
+
</span>
|
| 49 |
+
</div>
|
| 50 |
+
|
| 51 |
+
<p align="center" style="max-width: 700px; margin: 0 auto; font-family: 'Rajdhani', sans-serif; font-size: 1.1rem; color: #aaa; line-height: 1.6;">
|
| 52 |
+
A lightning‑fast, open‑source AI assistant forged in the heart of the TinyModels community. Hand‑picked data, real‑world training, and a personality that doesn't feel like a corporate robot. This is our take on what a compact, genuinely useful model should be.
|
| 53 |
+
</p>
|
| 54 |
+
|
| 55 |
+
<div align="center" style="margin: 40px 0;">
|
| 56 |
+
<a href="#quick-start" style="background: linear-gradient(135deg, #ff0080, #7928ca); color: white; padding: 14px 36px; border-radius: 50px; font-family: 'Orbitron', sans-serif; font-weight: 600; text-decoration: none; font-size: 1rem; box-shadow: 0 4px 20px rgba(255,0,128,0.4); transition: 0.2s;">
|
| 57 |
+
⬇ GET STARTED
|
| 58 |
+
</a>
|
| 59 |
+
</div>
|
| 60 |
+
|
| 61 |
+
<div style="display: flex; justify-content: center; gap: 40px; margin: 60px 0; flex-wrap: wrap;">
|
| 62 |
+
<div style="text-align: center; padding: 24px; border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; background: rgba(20,20,30,0.6); backdrop-filter: blur(10px); width: 160px;">
|
| 63 |
+
<div style="font-family: 'Orbitron', sans-serif; font-size: 2rem; color: #ff0080;">360M</div>
|
| 64 |
+
<div style="color: #888; font-family: 'Rajdhani', sans-serif;">Parameters</div>
|
| 65 |
+
</div>
|
| 66 |
+
<div style="text-align: center; padding: 24px; border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; background: rgba(20,20,30,0.6); backdrop-filter: blur(10px); width: 160px;">
|
| 67 |
+
<div style="font-family: 'Orbitron', sans-serif; font-size: 2rem; color: #7928ca;">724 MB</div>
|
| 68 |
+
<div style="color: #888; font-family: 'Rajdhani', sans-serif;">Size (FP16)</div>
|
| 69 |
+
</div>
|
| 70 |
+
<div style="text-align: center; padding: 24px; border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; background: rgba(20,20,30,0.6); backdrop-filter: blur(10px); width: 160px;">
|
| 71 |
+
<div style="font-family: 'Orbitron', sans-serif; font-size: 2rem; color: #ff0080;">1 Epoch</div>
|
| 72 |
+
<div style="color: #888; font-family: 'Rajdhani', sans-serif;">Focused Training</div>
|
| 73 |
+
</div>
|
| 74 |
+
<div style="text-align: center; padding: 24px; border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; background: rgba(20,20,30,0.6); backdrop-filter: blur(10px); width: 160px;">
|
| 75 |
+
<div style="font-family: 'Orbitron', sans-serif; font-size: 2rem; color: #7928ca;">Apache 2.0</div>
|
| 76 |
+
<div style="color: #888; font-family: 'Rajdhani', sans-serif;">License</div>
|
| 77 |
+
</div>
|
| 78 |
+
</div>
|
| 79 |
+
|
| 80 |
+
---
|
| 81 |
+
|
| 82 |
+
<div id="quick-start"></div>
|
| 83 |
+
<h2 style="font-family: 'Orbitron', sans-serif; color: #fff; font-size: 1.8rem;">🚀 QUICK START</h2>
|
| 84 |
+
|
| 85 |
+
```python
|
| 86 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 87 |
+
|
| 88 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 89 |
+
"TinyModels/Atom-350M",
|
| 90 |
+
torch_dtype="auto",
|
| 91 |
+
device_map="auto",
|
| 92 |
+
)
|
| 93 |
+
tokenizer = AutoTokenizer.from_pretrained("TinyModels/Atom-350M")
|
| 94 |
+
|
| 95 |
+
messages = [
|
| 96 |
+
{"role": "user", "content": "Explain how a bicycle stays upright in simple terms."}
|
| 97 |
+
]
|
| 98 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 99 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 100 |
+
|
| 101 |
+
outputs = model.generate(**inputs, max_new_tokens=150, temperature=0.7)
|
| 102 |
+
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
|
| 103 |
+
print(response)
|
| 104 |
+
```
|
| 105 |
+
|
| 106 |
+
---
|
| 107 |
+
|
| 108 |
+
<h2 style="font-family: 'Orbitron', sans-serif; color: #fff; font-size: 1.8rem;">🔧 OUR RECIPE</h2>
|
| 109 |
+
|
| 110 |
+
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin: 30px 0;">
|
| 111 |
+
<div style="background: rgba(20,20,30,0.7); border: 1px solid rgba(255,0,128,0.2); border-radius: 16px; padding: 20px;">
|
| 112 |
+
<h3 style="font-family: 'Orbitron', sans-serif; color: #ff0080; font-size: 1rem;">BASE MODEL</h3>
|
| 113 |
+
<p style="color: #bbb; font-family: 'Rajdhani', sans-serif; margin: 0;">SmolLM2‑360M‑Instruct</p>
|
| 114 |
+
</div>
|
| 115 |
+
<div style="background: rgba(20,20,30,0.7); border: 1px solid rgba(255,0,128,0.2); border-radius: 16px; padding: 20px;">
|
| 116 |
+
<h3 style="font-family: 'Orbitron', sans-serif; color: #ff0080; font-size: 1rem;">FINE‑TUNING</h3>
|
| 117 |
+
<p style="color: #bbb; font-family: 'Rajdhani', sans-serif; margin: 0;">QLoRA (4‑bit, rank‑16)</p>
|
| 118 |
+
</div>
|
| 119 |
+
<div style="background: rgba(20,20,30,0.7); border: 1px solid rgba(255,0,128,0.2); border-radius: 16px; padding: 20px;">
|
| 120 |
+
<h3 style="font-family: 'Orbitron', sans-serif; color: #ff0080; font-size: 1rem;">TRAINING DATA</h3>
|
| 121 |
+
<p style="color: #bbb; font-family: 'Rajdhani', sans-serif; margin: 0;">SmolTalk (smol‑magpie‑ultra)</p>
|
| 122 |
+
</div>
|
| 123 |
+
<div style="background: rgba(20,20,30,0.7); border: 1px solid rgba(255,0,128,0.2); border-radius: 16px; padding: 20px;">
|
| 124 |
+
<h3 style="font-family: 'Orbitron', sans-serif; color: #ff0080; font-size: 1rem;">FRAMEWORK</h3>
|
| 125 |
+
<p style="color: #bbb; font-family: 'Rajdhani', sans-serif; margin: 0;">Unsloth + Hugging Face</p>
|
| 126 |
+
</div>
|
| 127 |
+
<div style="background: rgba(20,20,30,0.7); border: 1px solid rgba(255,0,128,0.2); border-radius: 16px; padding: 20px;">
|
| 128 |
+
<h3 style="font-family: 'Orbitron', sans-serif; color: #ff0080; font-size: 1rem;">HARDWARE</h3>
|
| 129 |
+
<p style="color: #bbb; font-family: 'Rajdhani', sans-serif; margin: 0;">Kaggle T4 (free tier!)</p>
|
| 130 |
+
</div>
|
| 131 |
+
<div style="background: rgba(20,20,30,0.7); border: 1px solid rgba(255,0,128,0.2); border-radius: 16px; padding: 20px;">
|
| 132 |
+
<h3 style="font-family: 'Orbitron', sans-serif; color: #ff0080; font-size: 1rem;">EPOCHS</h3>
|
| 133 |
+
<p style="color: #bbb; font-family: 'Rajdhani', sans-serif; margin: 0;">1 — lean & efficient</p>
|
| 134 |
+
</div>
|
| 135 |
+
</div>
|
| 136 |
+
|
| 137 |
+
---
|
| 138 |
+
|
| 139 |
+
<h2 style="font-family: 'Orbitron', sans-serif; color: #fff; font-size: 1.8rem;">🤍 THIS IS OURS</h2>
|
| 140 |
+
|
| 141 |
+
<p style="font-family: 'Rajdhani', sans-serif; color: #bbb; font-size: 1.1rem; line-height: 1.6; max-width: 800px;">
|
| 142 |
+
<strong style="color: #ff0080;">We didn't just download a model and slap a name on it.</strong> TinyModels hand‑picked the training data, configured the QLoRA adapters, and ran the entire training pipeline ourselves. Atom‑350M is <em>our</em> interpretation of a small, helpful, open assistant — built with pride, released with no strings attached.
|
| 143 |
+
</p>
|
| 144 |
+
|
| 145 |
+
<p style="font-family: 'Rajdhani', sans-serif; color: #aaa; font-size: 1rem; margin-top: 10px;">
|
| 146 |
+
If you do something cool with it, just give us a shout‑out. We'd love to see what you build.
|
| 147 |
+
</p>
|
| 148 |
+
|
| 149 |
+
---
|
| 150 |
+
|
| 151 |
+
<h2 style="font-family: 'Orbitron', sans-serif; color: #fff; font-size: 1.8rem;">📜 LICENSE</h2>
|
| 152 |
+
|
| 153 |
+
<p style="font-family: 'Rajdhani', sans-serif; color: #bbb; font-size: 1.1rem;">
|
| 154 |
+
Apache 2.0 — free for research, commercial use, and even intergalactic travel.
|
| 155 |
+
</p>
|
| 156 |
+
|
| 157 |
+
<div align="center" style="margin: 60px 0 20px;">
|
| 158 |
+
<p style="font-family: 'Rajdhani', sans-serif; color: #555; font-size: 0.9rem;">
|
| 159 |
+
Crafted by <strong style="color: #ff0080;">TinyModels</strong> — small models, big ambitions.
|
| 160 |
+
</p>
|
| 161 |
+
</div>
|
| 162 |
+
|
| 163 |
+
<style>
|
| 164 |
+
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;600;700&family=Rajdhani:wght@400;500;600&display=swap');
|
| 165 |
+
|
| 166 |
+
body {
|
| 167 |
+
background: #0c0c14;
|
| 168 |
+
color: #ccc;
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
@keyframes float {
|
| 172 |
+
0% { transform: translateY(0); }
|
| 173 |
+
50% { transform: translateY(-8px); }
|
| 174 |
+
100% { transform: translateY(0); }
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
a {
|
| 178 |
+
color: #ff0080;
|
| 179 |
+
text-decoration: none;
|
| 180 |
+
}
|
| 181 |
+
</style>
|