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
| license: apache-2.0 | |
| language: | |
| - en | |
| tags: | |
| - assistant | |
| - chat | |
| - general-purpose | |
| - smollm2 | |
| - tiny | |
| - efficient | |
| - tinymodels | |
| pipeline_tag: text-generation | |
| library_name: transformers | |
| <div align="center"> | |
| <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;"> | |
| <circle cx="50" cy="50" r="45" fill="none" stroke="url(#grad1)" stroke-width="3"/> | |
| <circle cx="50" cy="50" r="30" fill="none" stroke="url(#grad2)" stroke-width="2" stroke-dasharray="8,6"/> | |
| <circle cx="50" cy="50" r="12" fill="url(#grad3)"/> | |
| <defs> | |
| <linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"> | |
| <stop offset="0%" style="stop-color:#ff0080;stop-opacity:1" /> | |
| <stop offset="100%" style="stop-color:#7928ca;stop-opacity:1" /> | |
| </linearGradient> | |
| <linearGradient id="grad2" x1="100%" y1="0%" x2="0%" y2="100%"> | |
| <stop offset="0%" style="stop-color:#7928ca;stop-opacity:1" /> | |
| <stop offset="100%" style="stop-color:#ff0080;stop-opacity:1" /> | |
| </linearGradient> | |
| <radialGradient id="grad3" cx="30%" cy="30%" r="70%"> | |
| <stop offset="0%" style="stop-color:#ff0080;stop-opacity:1" /> | |
| <stop offset="100%" style="stop-color:#7928ca;stop-opacity:1" /> | |
| </radialGradient> | |
| </defs> | |
| </svg> | |
| </div> | |
| <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> | |
| <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> | |
| <div align="center" style="margin: 30px 0;"> | |
| <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;"> | |
| ⚡ BUILT BY TINYMODELS | |
| </span> | |
| </div> | |
| <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;"> | |
| 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. | |
| </p> | |
| <div align="center" style="margin: 40px 0;"> | |
| <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;"> | |
| ⬇ GET STARTED | |
| </a> | |
| </div> | |
| <div style="display: flex; justify-content: center; gap: 40px; margin: 60px 0; flex-wrap: wrap;"> | |
| <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;"> | |
| <div style="font-family: 'Orbitron', sans-serif; font-size: 2rem; color: #ff0080;">360M</div> | |
| <div style="color: #888; font-family: 'Rajdhani', sans-serif;">Parameters</div> | |
| </div> | |
| <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;"> | |
| <div style="font-family: 'Orbitron', sans-serif; font-size: 2rem; color: #7928ca;">724 MB</div> | |
| <div style="color: #888; font-family: 'Rajdhani', sans-serif;">Size (FP16)</div> | |
| </div> | |
| <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;"> | |
| <div style="font-family: 'Orbitron', sans-serif; font-size: 2rem; color: #ff0080;">1 Epoch</div> | |
| <div style="color: #888; font-family: 'Rajdhani', sans-serif;">Focused Training</div> | |
| </div> | |
| <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;"> | |
| <div style="font-family: 'Orbitron', sans-serif; font-size: 2rem; color: #7928ca;">Apache 2.0</div> | |
| <div style="color: #888; font-family: 'Rajdhani', sans-serif;">License</div> | |
| </div> | |
| </div> | |
| --- | |
| <div id="quick-start"></div> | |
| <h2 style="font-family: 'Orbitron', sans-serif; color: #fff; font-size: 1.8rem;">🚀 QUICK START</h2> | |
| ```python | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| model = AutoModelForCausalLM.from_pretrained( | |
| "TinyModels/Atom-350M", | |
| torch_dtype="auto", | |
| device_map="auto", | |
| ) | |
| tokenizer = AutoTokenizer.from_pretrained("TinyModels/Atom-350M") | |
| messages = [ | |
| {"role": "user", "content": "Explain how a bicycle stays upright in simple terms."} | |
| ] | |
| prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) | |
| inputs = tokenizer(prompt, return_tensors="pt").to(model.device) | |
| outputs = model.generate(**inputs, max_new_tokens=150, temperature=0.7) | |
| response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True) | |
| print(response) | |
| ``` | |
| --- | |
| <h2 style="font-family: 'Orbitron', sans-serif; color: #fff; font-size: 1.8rem;">🔧 OUR RECIPE</h2> | |
| <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin: 30px 0;"> | |
| <div style="background: rgba(20,20,30,0.7); border: 1px solid rgba(255,0,128,0.2); border-radius: 16px; padding: 20px;"> | |
| <h3 style="font-family: 'Orbitron', sans-serif; color: #ff0080; font-size: 1rem;">BASE MODEL</h3> | |
| <p style="color: #bbb; font-family: 'Rajdhani', sans-serif; margin: 0;">SmolLM2‑360M‑Instruct</p> | |
| </div> | |
| <div style="background: rgba(20,20,30,0.7); border: 1px solid rgba(255,0,128,0.2); border-radius: 16px; padding: 20px;"> | |
| <h3 style="font-family: 'Orbitron', sans-serif; color: #ff0080; font-size: 1rem;">FINE‑TUNING</h3> | |
| <p style="color: #bbb; font-family: 'Rajdhani', sans-serif; margin: 0;">QLoRA (4‑bit, rank‑16)</p> | |
| </div> | |
| <div style="background: rgba(20,20,30,0.7); border: 1px solid rgba(255,0,128,0.2); border-radius: 16px; padding: 20px;"> | |
| <h3 style="font-family: 'Orbitron', sans-serif; color: #ff0080; font-size: 1rem;">TRAINING DATA</h3> | |
| <p style="color: #bbb; font-family: 'Rajdhani', sans-serif; margin: 0;">SmolTalk (smol‑magpie‑ultra)</p> | |
| </div> | |
| <div style="background: rgba(20,20,30,0.7); border: 1px solid rgba(255,0,128,0.2); border-radius: 16px; padding: 20px;"> | |
| <h3 style="font-family: 'Orbitron', sans-serif; color: #ff0080; font-size: 1rem;">FRAMEWORK</h3> | |
| <p style="color: #bbb; font-family: 'Rajdhani', sans-serif; margin: 0;">Unsloth + Hugging Face</p> | |
| </div> | |
| <div style="background: rgba(20,20,30,0.7); border: 1px solid rgba(255,0,128,0.2); border-radius: 16px; padding: 20px;"> | |
| <h3 style="font-family: 'Orbitron', sans-serif; color: #ff0080; font-size: 1rem;">HARDWARE</h3> | |
| <p style="color: #bbb; font-family: 'Rajdhani', sans-serif; margin: 0;">Kaggle T4 (free tier!)</p> | |
| </div> | |
| <div style="background: rgba(20,20,30,0.7); border: 1px solid rgba(255,0,128,0.2); border-radius: 16px; padding: 20px;"> | |
| <h3 style="font-family: 'Orbitron', sans-serif; color: #ff0080; font-size: 1rem;">EPOCHS</h3> | |
| <p style="color: #bbb; font-family: 'Rajdhani', sans-serif; margin: 0;">1 — lean & efficient</p> | |
| </div> | |
| </div> | |
| --- | |
| <h2 style="font-family: 'Orbitron', sans-serif; color: #fff; font-size: 1.8rem;">🤍 THIS IS OURS</h2> | |
| <p style="font-family: 'Rajdhani', sans-serif; color: #bbb; font-size: 1.1rem; line-height: 1.6; max-width: 800px;"> | |
| <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. | |
| </p> | |
| <p style="font-family: 'Rajdhani', sans-serif; color: #aaa; font-size: 1rem; margin-top: 10px;"> | |
| If you do something cool with it, just give us a shout‑out. We'd love to see what you build. | |
| </p> | |
| --- | |
| <h2 style="font-family: 'Orbitron', sans-serif; color: #fff; font-size: 1.8rem;">📜 LICENSE</h2> | |
| <p style="font-family: 'Rajdhani', sans-serif; color: #bbb; font-size: 1.1rem;"> | |
| Apache 2.0 — free for research, commercial use, and even intergalactic travel. | |
| </p> | |
| <div align="center" style="margin: 60px 0 20px;"> | |
| <p style="font-family: 'Rajdhani', sans-serif; color: #555; font-size: 0.9rem;"> | |
| Crafted by <strong style="color: #ff0080;">TinyModels</strong> — small models, big ambitions. | |
| </p> | |
| </div> | |
| <style> | |
| @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;600;700&family=Rajdhani:wght@400;500;600&display=swap'); | |
| body { | |
| background: #0c0c14; | |
| color: #ccc; | |
| } | |
| @keyframes float { | |
| 0% { transform: translateY(0); } | |
| 50% { transform: translateY(-8px); } | |
| 100% { transform: translateY(0); } | |
| } | |
| a { | |
| color: #ff0080; | |
| text-decoration: none; | |
| } | |
| </style> | |