Instructions to use NoesisLab/Kai-0.35B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NoesisLab/Kai-0.35B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NoesisLab/Kai-0.35B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NoesisLab/Kai-0.35B-Instruct") model = AutoModelForCausalLM.from_pretrained("NoesisLab/Kai-0.35B-Instruct") 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 NoesisLab/Kai-0.35B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NoesisLab/Kai-0.35B-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": "NoesisLab/Kai-0.35B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NoesisLab/Kai-0.35B-Instruct
- SGLang
How to use NoesisLab/Kai-0.35B-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 "NoesisLab/Kai-0.35B-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": "NoesisLab/Kai-0.35B-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 "NoesisLab/Kai-0.35B-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": "NoesisLab/Kai-0.35B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use NoesisLab/Kai-0.35B-Instruct with Docker Model Runner:
docker model run hf.co/NoesisLab/Kai-0.35B-Instruct
Kai-0.35B-Instruct
A compact 0.35B-parameter instruction-tuned language model optimized for reasoning, math, and code generation tasks.
Model Details
| Model | Kai-0.35B-Instruct |
| Architecture | LlamaForCausalLM |
| Parameters | 360M |
| Hidden size | 960 |
| Layers | 32 |
| Attention heads | 15 (5 KV heads, GQA) |
| Context length | 8192 |
| Precision | bfloat16 |
| Vocab size | 49,152 |
Benchmark Results (5-shot, log-likelihood)
| Benchmark | Kai-0.35B-Instruct | Mamba (370M) | TinyLlama (1.1B) | Llama-3.2 (1B) |
|---|---|---|---|---|
| ARC-Challenge (science reasoning) | 37.80% | ~29.1% | ~30.1% | ~44.5% |
| HellaSwag (sentence completion) | 55.88% | ~53.8% | ~59.2% | ~61.1% |
| PIQA (physical commonsense) | 71.82% | ~69.6% | ~73.0% | ~74.5% |
Code Generation — MBPP (3-shot, pass@1)
| Model | Params | MBPP pass@1 |
|---|---|---|
| Mamba / Mamba-2 | 370M | <10.0% |
| TinyLlama | 1.1B | ~19.91% |
| Kai-0.35B-Instruct | 360M | 22.20% |
| Llama-3.2-1B (Base) | 1.0B | ~25-30% |
| Llama-3.2-1B-Instruct | 1.0B | ~49.0% |
Key Observations
ARC-Challenge: Kai-0.35B scores 37.80% (5-shot), significantly outperforming both Mamba-370M (+8.7pp) and TinyLlama-1.1B (+7.7pp) — a model 3x its size.
PIQA: At 71.82%, Kai-0.35B nearly matches TinyLlama-1.1B (73.0%) with only 1/3 the parameters, and trails the 1B-class Llama-3.2 by less than 3pp.
MBPP: At 22.20% pass@1, Kai-0.35B surpasses TinyLlama-1.1B (~19.91%) in code generation despite being 3x smaller.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained(
"NoesisLab/Kai-0.35B-Instruct",
torch_dtype=torch.bfloat16,
)
tokenizer = AutoTokenizer.from_pretrained("NoesisLab/Kai-0.35B-Instruct")
messages = [{"role": "user", "content": "What is 25 * 4?"}]
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt")
output = model.generate(input_ids, max_new_tokens=256)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Citation
@misc{noesislab2026nkai,
title={Kai-0.35B-Instruct},
author={NoesisLab},
year={2026},
url={https://huggingface.co/NoesisLab/Kai-0.35B-Instruct}
}
License
Apache 2.0
- Downloads last month
- 18
Model tree for NoesisLab/Kai-0.35B-Instruct
Collection including NoesisLab/Kai-0.35B-Instruct
Article mentioning NoesisLab/Kai-0.35B-Instruct
Evaluation results
- Accuracy (normalized) on ARC-Challengetest set self-reported37.800
- Accuracy (normalized) on HellaSwagvalidation set self-reported55.880
- Accuracy (normalized) on PIQAvalidation set self-reported71.820
- pass@1 on MBPPtest set self-reported22.200