Text Generation
Transformers
Safetensors
Vietnamese
llama
vietnamese
causal-lm
pretraining
viena
conversational
text-generation-inference
Instructions to use vietrix/viena-60m-pretrain with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vietrix/viena-60m-pretrain with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="vietrix/viena-60m-pretrain") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("vietrix/viena-60m-pretrain") model = AutoModelForCausalLM.from_pretrained("vietrix/viena-60m-pretrain") 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-pretrain with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vietrix/viena-60m-pretrain" # 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-pretrain", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/vietrix/viena-60m-pretrain
- SGLang
How to use vietrix/viena-60m-pretrain 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-pretrain" \ --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-pretrain", "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-pretrain" \ --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-pretrain", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use vietrix/viena-60m-pretrain with Docker Model Runner:
docker model run hf.co/vietrix/viena-60m-pretrain
Viena 60M (Pretrain)
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 pretrain corpus.
- Domains: Vietnam/general, math, code, identity.
- Raw JSONL entries: ~2.4k; after cleanup/dedupe, HF dataset contains 472 unique texts.
- PII: best-effort redaction during dataset build.
Training procedure
- Objective: next-token prediction with packed sequences.
- Sequence length: 1024.
- Global batch size: 64 (batch 16 x grad_accum 4).
- Optimizer: AdamW, lr 3e-4, weight decay 0.1, cosine decay with 10% warmup.
- Steps: 2,500 (approx 163.8M tokens processed).
- Checkpoints saved every 1,250 steps.
Intended use
- Base model for continued training or fine-tuning on Vietnamese tasks.
- Not instruction-tuned; outputs may be unaligned.
Limitations
- Trained on a small synthetic corpus; coverage and factuality are limited.
- Not suitable for safety-critical or high-stakes applications.
- Tokenizer vocab is much smaller than model vocab; lexical coverage is limited.
How to use
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "vietrix/viena-60m-pretrain"
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
- 1