Instructions to use dungnvt/Tini-8B-A1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dungnvt/Tini-8B-A1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dungnvt/Tini-8B-A1B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dungnvt/Tini-8B-A1B") model = AutoModelForCausalLM.from_pretrained("dungnvt/Tini-8B-A1B") 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 Settings
- vLLM
How to use dungnvt/Tini-8B-A1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dungnvt/Tini-8B-A1B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dungnvt/Tini-8B-A1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dungnvt/Tini-8B-A1B
- SGLang
How to use dungnvt/Tini-8B-A1B 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 "dungnvt/Tini-8B-A1B" \ --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": "dungnvt/Tini-8B-A1B", "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 "dungnvt/Tini-8B-A1B" \ --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": "dungnvt/Tini-8B-A1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use dungnvt/Tini-8B-A1B with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for dungnvt/Tini-8B-A1B to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for dungnvt/Tini-8B-A1B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for dungnvt/Tini-8B-A1B to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="dungnvt/Tini-8B-A1B", max_seq_length=2048, ) - Docker Model Runner
How to use dungnvt/Tini-8B-A1B with Docker Model Runner:
docker model run hf.co/dungnvt/Tini-8B-A1B
Tini-8B-A1B
Tini-8B-A1B is a fine-tuned version of the hybrid model architecture LiquidAI/LFM2.5-8B-A1B. This model is optimized for Agentic Reasoning, seamlessly combining deep chain-of-thought (CoT), native system function calling capabilities.
📊 Dataset Mixture
The model was Supervised Fine-Tuned (SFT) on a curated mixture of samples balancing deep reasoning and function-calling actions:
| Dataset | Category |
|---|---|
nohurry/Opus-4.6-Reasoning-3000x-filtered |
Advanced Reasoning |
Jackrong/DeepSeek-V4-Distill-8000x |
Reasoning / Math / Code |
Jackrong/Qwen3.5-reasoning-700x |
Logic / Hard Math |
NousResearch/hermes-function-calling-v1 |
Tool Use / Agentic |
🛠️ Training Techniques
To preserve the model's core capabilities while focusing gradient updates entirely on reasoning tracks, the following configurations were applied:
- Train on Response Only
- LoRA Target Modules
🏃♂️ Quick Start & Inference Parameters Guide
💡 Recommended Decoding Parameters
General & Contextual Reasoning (Riddles, Nuances, Analysis):
temperature: 0.6|top_p: 0.95|top_k: 50|repetition_penalty: 1.10Mathematics & Technical Coding Tasks:
temperature: 0.35|top_p: 0.90|top_k: 40|repetition_penalty: 1.08
🚀 Python Example Script
import torch
from unsloth import FastLanguageModel
from transformers import TextStreamer
MODEL_PATH = "./Tini-8B-A1B"
# 1. Load model with 4-bit quantization for VRAM efficiency
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = MODEL_PATH,
max_seq_length = 2048,
dtype = torch.bfloat16,
load_in_4bit = True,
trust_remote_code = True
)
FastLanguageModel.for_inference(model)
# 2. Set system prompt forcing Vietnamese internal monologue
messages = [
{
"role": "system",
"content": "Bạn là một trợ lý AI thông minh. BẮT BUỘC phải thực hiện toàn bộ chuỗi suy luận trong thẻ <think> bằng TIẾNG VIỆT để bảo toàn ngữ cảnh văn hóa và tiết kiệm token."
},
{
"role": "user",
"content": "Một bể nước đang cạn hoàn toàn. Nếu mở riêng vòi A đầy sau 4 giờ. Mở riêng vòi B (vòi xả) cạn sau 6 giờ. Hỏi nếu mở cả hai vòi cùng lúc thì sau bao lâu đầy được 75% bể?"
}
]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to("cuda")
text_streamer = TextStreamer(tokenizer, skip_prompt=True)
# 3. Generate with streaming output and a 2048 max token limit
with torch.no_grad():
_ = model.generate(
input_ids = inputs,
streamer = text_streamer,
max_new_tokens = 2048,
use_cache = True,
temperature = 0.6,
top_p = 0.95,
top_k = 50,
repetition_penalty = 1.10
)
- Downloads last month
- 95