Text Generation
Transformers
Safetensors
English
gpt2
novi
novi-nano
novi-nano-instruct
causal-lm
from-scratch
instruction-tuning
chatml
conversational
text-generation-inference
Instructions to use Novi-AI/Novi-Nano-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Novi-AI/Novi-Nano-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Novi-AI/Novi-Nano-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Novi-AI/Novi-Nano-Instruct") model = AutoModelForCausalLM.from_pretrained("Novi-AI/Novi-Nano-Instruct", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Novi-AI/Novi-Nano-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Novi-AI/Novi-Nano-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Novi-AI/Novi-Nano-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Novi-AI/Novi-Nano-Instruct
- SGLang
How to use Novi-AI/Novi-Nano-Instruct 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 "Novi-AI/Novi-Nano-Instruct" \ --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": "Novi-AI/Novi-Nano-Instruct", "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 "Novi-AI/Novi-Nano-Instruct" \ --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": "Novi-AI/Novi-Nano-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Novi-AI/Novi-Nano-Instruct with Docker Model Runner:
docker model run hf.co/Novi-AI/Novi-Nano-Instruct
File size: 6,361 Bytes
a4c83e6 cc07013 a4c83e6 b1a79f3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | ---
language:
- en
library_name: transformers
pipeline_tag: text-generation
tags:
- novi
- novi-nano
- novi-nano-instruct
- causal-lm
- gpt2
- from-scratch
- instruction-tuning
- chatml
datasets:
- Novi-AI/Novi-510x
---
# Novi-Nano-Instruct

**Novi-Nano-Instruct** is a tiny instruction-tuned causal language model developed by **Novi-AI**.
It is based on **Novi-Nano-Base** and fine-tuned on a small instruction dataset to experiment with instruction following and conversational behavior at an extremely small scale.
β‘ **1.26M parameters Β· 500 training examples Β· 256-token context**
## Model Details
### Architecture
| Property | Value |
| --------------- | -----------------------: |
| Model type | Causal Language Model |
| Base model | `Novi-AI/Novi-Nano-Base` |
| Parameters | **1,258,848** |
| Vocabulary size | **8,195** |
| Context length | **256** |
| Embedding size | **96** |
| Layers | **4** |
| Attention heads | **4** |
| FFN size | **384** |
| Tensor type | **F32** |
## Instruction Tuning
Novi-Nano-Instruct was trained from **Novi-Nano-Base** using a small instruction dataset containing **510 examples**.
### Dataset
| Split | Examples |
| ---------- | -------: |
| Training | **500** |
| Validation | **10** |
The model uses a ChatML-style format with:
```text
<|im_start|>
<|im_end|>
```
Training loss was applied specifically to the assistant responses, allowing the model to focus on learning how to respond to user instructions.
### Training Configuration
| Property | Value |
| ----------------------- | -------: |
| Epochs | **5** |
| Batch size | **16** |
| Gradient accumulation | **2** |
| Effective batch size | **32** |
| Maximum sequence length | **256** |
| Learning rate | **2e-5** |
| Precision | **FP32** |
| Device | **CPU** |
## Training Statistics
The final training run produced:
| Metric | Result |
| --------------------------- | --------------: |
| Final validation loss | **5.153667** |
| Final validation perplexity | **173.0650** |
| Training examples | **500** |
| Validation examples | **10** |
| Training time | **~32 seconds** |
Because the validation set contains only **10 examples**, these metrics should be considered experimental rather than a comprehensive benchmark.
## Tokenizer
Novi-Nano-Instruct uses the custom tokenizer developed for Novi-Nano.
The original tokenizer vocabulary was **8,192 tokens**, with additional tokens already present in the tokenizer.
Two ChatML tokens were added for instruction tuning:
* `<|im_start|>` β **8193**
* `<|im_end|>` β **8194**
The final tokenizer size is **8,195 tokens**.
The tokenizer was originally trained using data from:
* FineWeb-Edu
* FineWeb-HQ
* SmolLM-Cosmopedia
## Intended Use
Novi-Nano-Instruct is primarily intended for:
* π¬ Research and experimentation
* π§ͺ Small-model instruction-tuning experiments
* π Educational purposes
* π¬ Tiny conversational-model experiments
* π» Lightweight local inference
* π οΈ Experimenting with extremely small instruction-tuned models
As an **experimental 1.26M-parameter model**, it is not intended to compete with modern billion-parameter language models.
## Limitations
Novi-Nano-Instruct is an extremely small experimental language model trained on only **500 instruction examples**.
Because of its size and limited training data, it may:
* Generate incoherent text
* Repeat phrases
* Produce unrelated responses
* Fail to follow instructions
* Produce factual errors
* Have very limited world knowledge
* Perform poorly on reasoning tasks
* Struggle with longer conversations
* Lose context beyond its 256-token window
* Produce malformed or unexpected responses
Generation quality is currently **highly experimental**. The model can generate text, but it does not yet consistently produce reliable assistant-style responses.
This model should be considered a **research and experimentation model**, rather than a production-ready conversational AI.
## Usage
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "Novi-AI/Novi-Nano-Instruct"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
messages = [
{
"role": "system",
"content": "You are Novi-Nano, a helpful AI assistant."
},
{
"role": "user",
"content": "Give a synonym for 'quiet'."
}
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_new_tokens=50,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```
## Chat Template
Novi-Nano-Instruct uses a ChatML-style conversation format:
```text
<|im_start|>system
You are Novi-Nano, a helpful AI assistant.<|im_end|>
<|im_start|>user
Give a synonym for 'quiet'.<|im_end|>
<|im_start|>assistant
A synonym is 'silent'.<|im_end|>
```
For generation, the assistant message is opened automatically by the chat template.
## Project History
Novi AI follows the earlier **AppleMind** experiments, with Novi becoming the primary project for developing small language models.
**AppleMind β Novi AI β Novi-Nano β Novi-Nano-Instruct** π
## Acknowledgements
Novi-Nano was built using the open-source machine-learning ecosystem and datasets made available by the community.
Special thanks to:
* Hugging Face π€
* FineWeb
* SmolLM
* Cosmopedia
## License
This model is released under the **Apache 2.0** license.
---
## π§ Novi AI
**Small models. Big experiments.**
Novi-Nano-Instruct explores instruction tuning at an extremely small scale, with just **1.26 million parameters** and **500 training examples**.
It is intentionally tiny β exploring how far instruction following can go with a fraction of the parameters used by modern LLMs.
*Novi AI 2026 β Project Kairo* |