Text Generation
Transformers
Safetensors
Vietnamese
llama
vietnamese
causal-lm
finetuning
viena
conversational
text-generation-inference
Instructions to use vietrix/viena-60m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vietrix/viena-60m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="vietrix/viena-60m") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("vietrix/viena-60m") model = AutoModelForCausalLM.from_pretrained("vietrix/viena-60m") 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 vietrix/viena-60m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vietrix/viena-60m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vietrix/viena-60m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/vietrix/viena-60m
- SGLang
How to use vietrix/viena-60m 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 "vietrix/viena-60m" \ --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": "vietrix/viena-60m", "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 "vietrix/viena-60m" \ --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": "vietrix/viena-60m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use vietrix/viena-60m with Docker Model Runner:
docker model run hf.co/vietrix/viena-60m
Viena 60M (SFT)
Model details
- Developed by: Vietrix
- Model type: decoder-only causal LM (Llama-style)
- Parameters: ~60M
- Layers: 16
- Hidden size: 512
- Attention heads: 8 (KV heads: 4)
- Max sequence length: 1024
- RoPE theta: 10000
- Normalization/MLP: RMSNorm + SwiGLU
- Precision: BF16 training
Tokenizer
- SentencePiece BPE
- Target vocab in config: 32k
- Actual vocab in tokenizer.model: 2105 (trained on a small corpus)
- Note: embeddings are sized for 32k; only the first 2105 tokens are used by the tokenizer.
Training data
- Internal synthetic Vietnamese instruction/chat data.
- Train/val split: 2,000 / 200 JSONL records.
- Format: messages with roles (system/user/assistant/tool).
- PII: best-effort redaction applied during dataset preparation.
Fine-tuning procedure
- Initialized from:
vietrix/viena-60m-pretrain. - Objective: token-level cross-entropy, prompt loss disabled.
- Sequence length: 1024.
- Global batch size: 32 (batch 8 x grad_accum 4).
- Optimizer: AdamW, lr 2e-4, weight decay 0.01, cosine decay with warmup.
- Steps: 1,000.
- Validation every 200 steps (10 batches).
Intended use
- Vietnamese chat/instruction-following use cases.
- Research and prototyping; not a production-grade safety model.
Limitations
- Trained on a small synthetic corpus; may hallucinate or respond incorrectly.
- Not safety-tuned for sensitive domains.
- Tokenizer vocab is small; lexical coverage is limited.
How to use
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "vietrix/viena-60m"
tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=False)
model = AutoModelForCausalLM.from_pretrained(model_id)
If AutoTokenizer fails, load the SentencePiece model explicitly:
from transformers import LlamaTokenizer
tokenizer = LlamaTokenizer.from_pretrained(model_id, use_fast=False)
- Downloads last month
- 4
Model tree for vietrix/viena-60m
Base model
vietrix/viena-60m-pretrain
docker model run hf.co/vietrix/viena-60m