Instructions to use Se00n00/TinyLM-1-70M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Se00n00/TinyLM-1-70M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Se00n00/TinyLM-1-70M", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Se00n00/TinyLM-1-70M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Se00n00/TinyLM-1-70M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Se00n00/TinyLM-1-70M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Se00n00/TinyLM-1-70M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Se00n00/TinyLM-1-70M
- SGLang
How to use Se00n00/TinyLM-1-70M 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 "Se00n00/TinyLM-1-70M" \ --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": "Se00n00/TinyLM-1-70M", "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 "Se00n00/TinyLM-1-70M" \ --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": "Se00n00/TinyLM-1-70M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Se00n00/TinyLM-1-70M with Docker Model Runner:
docker model run hf.co/Se00n00/TinyLM-1-70M
TinyLM-1-70M
TinyLM-1-70M is a compact decoder-only Transformer language model designed for efficient instruction following and conversational AI. The model has approximately 72M parameters and has been fine-tuned using Supervised Fine-Tuning (SFT) on an instruction-response dataset to improve chat capabilities while maintaining a lightweight footprint suitable for local inference and resource-constrained environments.
Evaluation
All evaluations are zero-shot unless stated otherwise, and i used lm_eval to run them

Model Architecture & Hyperparameters
TinyLM-1-70M is built on a custom Gated Causal LM Transformer architecture with pre-normalization and SwiGLU activation functions:
| Hyperparameter | Value | Description |
|---|---|---|
| Architecture | Custom Gated GPT | Autoregressive Decoder-Only Transformer |
| Total Parameters | ~72.26M (75,772,928) | Compact and ultra-fast for edge & local CPU/GPU |
| inference | ||
vocab_size |
32,771 | Includes special chat tags (`< |
hidden_size (d_model) |
512 | Model hidden dimension |
intermediate_size (ff_hidden_d) |
2,048 | SwiGLU Gated Feedforward hidden dimension |
num_hidden_layers |
10 | Number of Transformer block layers |
num_attention_heads |
8 | Attention heads (Head dim = 64) |
max_position_embeddings |
512 | Maximum context sequence length |
| Normalization | RMSNorm (eps=1e-8) |
Scale normalization for accelerated throughput |
| Activation Function | SwiGLU (SiLU) | Gated Feedforward activation |
| Tie Word Embeddings | False |
Independent input embedding and LM head projection |
Tokenizer & Chat Template
The model uses a custom Byte-Level BPE Tokenizer equipped with special tokens and a pre-configured Jinja2 chat_template for multi-turn conversations.
| Property | Value |
|---|---|
| Tokenizer Type | PreTrainedTokenizerFast (Byte-Level BPE) |
| Vocabulary Size | 32,771 |
| Special Tokens | [PAD] [UNK] <START> <END> |
| Chat Control Tokens | <SYSTEM> <USER> <ASSISTANT> |
| Chat Template | Native Jinja2 support via tokenizer.apply_chat_template() |
Training Configuration
| Parameter | Value |
|---|---|
| Pipeline Process | Supervised Instruction Fine-Tuning (SFT / IFT) |
| Learning Rate | 1e-4 |
| Learning Rate Schedule | warmup + cosine decay |
| Micro-Batch Size | 8 per device |
| Gradient Accumulation | 4 steps |
| Effective Batch Size | 32 × 512 tokens |
| Optimizer | AdamW (weight_decay=0.1) |
| Max Sequence Length | 512 tokens |
| Hardware | GPU Accelerated |
🚀 Inference
# pip install torch transformers
import torch
from transformers import pipeline
pipe = pipeline(
"text-generation",
model="Se00n00/TinyLM-1-70M",
trust_remote_code = True
)
messages = [
{"role": "system", "content": "You are a helpful AI assistant."},
{"role": "user", "content": "Explain artificial intelligence in simple terms."}
]
prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
result = pipe(
prompt,
max_new_tokens=120,
do_sample=True,
temperature=0.5,
top_k=40,
top_p=0.9
)
print(result[0]['generated_text'])
──────
Sample Outputs
System: You are a helpful AI assistant
User: What is the main concept of physics?
The main concept of physics is the idea that the laws of physics are governed by the laws of physics that govern the behavior of particles and forces . This idea is rooted in the idea that the laws of physics are not just a collection of laws , but are a fundamental aspect of the universe that govern s the behavior of matter , energy , and matter . The core idea of physics is that the laws of physics are governed by the laws of physics that govern the behavior of matter and energy . These laws are not a fixed set of laws , but rather a fundamental part of the universe that govern s the behavior of matter and energy . The laws of physics , which govern the behavior of matter and energy , are governed by the laws of physics that govern the behavior of matter and energy . These laws are not a fixed set of laws , but rather a fundamental aspect of the universe that govern s the behavior of matter and energy . The laws of physics , which govern the behavior of matter and energy , are governed by the laws of physics that govern the behavior of matter and energy . These laws are not a fixed set of laws , but rather a fundamental aspect of the universe that govern s the behavior of matter and energy . The laws of physics are not a fixed set of laws , but rather a fundamental part of the universe that govern s the behavior of matter and energy . The laws of physics are governed by the laws of physics that govern the behavior of matter and energy . These laws are not a fixed set of laws , but rather a fundamental part of the universe that govern s the behavior of matter and energy . The laws of physics are governed by the laws of physics that govern the behavior of matter and energy . These laws are not a fixed set of laws , but rather a fundamental part of the universe that govern s the behavior of matter and energy . The laws of physics are not a fixed set of laws , but rather a fundamental part of the universe that govern s the behavior of matter and energy . The laws of physics are governed by the laws of physics that govern the behavior of matter and energy . These laws are not a fixed set of laws , but rather a fundamental part of the universe that govern s the behavior of matter and energy . The laws of physics are not a fixed set of laws , but rather a fundamental part of the universe that govern s the behavior of matter and energy . The laws of physics are not a fixed set of laws , but rather a fundamental part of
System: You are a helpful AI assistant
User: Explain artificial intelligence in simple terms
The concept of artificial intelligence in simple terms is a fascinating and multif ace ted concept that has far - reaching implications in various fields . One of the most significant implications is that it can lead to the development of more advanced artificial intelligence , such as machine learning , artificial intelligence , and machine learning . AI systems can learn from data , identify patterns , and generate outputs , making them more accurate and reliable . This , in turn , can lead to the development of more efficient and effective AI systems . Another significant benefit of artificial intelligence is its ability to provide a more comprehensive and n uan ced understanding of the world . AI systems can learn from data , identify patterns , and make predictions , which can inform decision - making and decision - making . This , in turn , can lead to more effective decision - making , as AI systems can learn from data and make informed decisions based on patterns and trends . Furthermore , AI systems can also provide a more n uan ced and accurate understanding of the world . By analyzing vast amounts of data , AI systems can identify patterns and trends that might be difficult to discern from real - world data . This , in turn , can lead to more effective decision - making , as AI systems can learn from data and make predictions that are not always accurate . Furthermore , AI systems can also help to improve our ability to analyze and interpret large datasets . By analyzing vast amounts of data , AI systems can identify patterns and trends that might be difficult to discern from real - world data . This , in turn , can lead to more accurate and reliable data , as AI systems can make more accurate predictions and decisions . Lastly , AI systems can also be used to improve our ability to analyze and interpret large datasets . By analyzing large datasets , AI systems can identify patterns and trends that might be difficult to discern from real - world data . This , in turn , can lead to more accurate and reliable data , as AI systems can learn from data and make more accurate predictions . Overall , the concept of artificial intelligence in simple terms is a rich and multif ace ted concept that has far - reaching implications in various fields , including science , technology , and human understanding . While it has the potential to revolution ize the field of AI , it also raises important questions about the nature of intelligence , the impact of AI systems on society , and the role of AI in shaping human society .
- Downloads last month
- 152
Dataset used to train Se00n00/TinyLM-1-70M
Evaluation results
- accuracy_norm on HellaSwagself-reported0.276
- accuracy on CommonsenseQAself-reported0.196
- accuracy_norm on PIQAself-reported0.551
- accuracy on Winograndeself-reported0.504
- accuracy on IFEvalself-reported0.123
- perplexity on WikiText-2self-reported147.290
- accuracy on BLiMPself-reported0.698
- exact_match on GSM8Ktest set self-reported0.018