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.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model = AutoModelForCausalLM.from_pretrained(
4 "TinyModels/Atom-350M",
5 torch_dtype="auto",
6 device_map="auto",
7)
8tokenizer = AutoTokenizer.from_pretrained("TinyModels/Atom-350M")
9
10messages = [
11 {"role": "user", "content": "Explain how a bicycle stays upright in simple terms."}
12]
13prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
14inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
15
16outputs = model.generate(**inputs, max_new_tokens=150, temperature=0.7)
17response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
18print(response)
If you do something cool with it, just give us a shout‑out. We'd love to see what you build.
Apache 2.0 — free for research, commercial use, and even intergalactic travel.