Text Generation
Transformers
Safetensors
PyTorch
Vietnamese
English
llama
viena
causal-lm
text-generation-inference
Instructions to use vietrix/viena-tiny-demo-pretrain with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vietrix/viena-tiny-demo-pretrain with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="vietrix/viena-tiny-demo-pretrain")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("vietrix/viena-tiny-demo-pretrain") model = AutoModelForCausalLM.from_pretrained("vietrix/viena-tiny-demo-pretrain") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use vietrix/viena-tiny-demo-pretrain with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vietrix/viena-tiny-demo-pretrain" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vietrix/viena-tiny-demo-pretrain", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/vietrix/viena-tiny-demo-pretrain
- SGLang
How to use vietrix/viena-tiny-demo-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-tiny-demo-pretrain" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vietrix/viena-tiny-demo-pretrain", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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-tiny-demo-pretrain" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vietrix/viena-tiny-demo-pretrain", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use vietrix/viena-tiny-demo-pretrain with Docker Model Runner:
docker model run hf.co/vietrix/viena-tiny-demo-pretrain
Viena Tiny Pretrain (Base)
This is a tiny, pretrain-only Viena checkpoint. It is not instruction tuned. Use it as a base for further pretraining or SFT. It is intended for smoke tests only.
Model description
- Architecture: decoder-only Transformer (VienaModel) with RMSNorm, RoPE, SwiGLU, GQA.
- Parameters: ~10M (tiny config).
- Tokenizer: SentencePiece BPE (target vocab 2000; actual vocab may be smaller due to tiny data).
- Training: small offline synthetic dataset shipped with the repo.
Training data
- Pretrain:
viena_data/examples/pretrain_offline.jsonl
All datasets are synthetic and intended for offline tests.
Training recipe (tiny)
- Config:
configs/viena_tiny.yaml - Pretrain: 50 steps
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "vietrix/viena-tiny-demo-pretrain"
tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=False)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
device_map="auto",
)
prompt = "Viena la gi?
"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=128, do_sample=True, temperature=0.7, top_p=0.9)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Limitations
- Very small dataset and very few steps.
- Not instruction tuned; responses are raw continuations.
- Not suitable for real use or evaluation.
License
MIT (code + demo weights). See repository license for details.
- Downloads last month
- 2