Downloads · 30 days
12
4% of all-time downloads
VLAI-AIVN/vigpt2-aio-mixed-one-step
vigpt2-aio-mixed-one-step is a text generation model from VLAI-AIVN. Use it when you need the model to write or continue text. It is set up for transformers.
VLAI-AIVN/vigpt2-aio-mixed-one-step is a Vietnamese GPT-2 style causal language model trained with a single mixed pretraining run over general Vietnamese text and a poem corpus.
Downloads · 30 days
12
4% of all-time downloads
All-time downloads
322
Public
Parameters
124M
249 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors249 MB · 98%
From the Hugging Face model README
VLAI-AIVN/vigpt2-aio-mixed-one-step is a Vietnamese GPT-2 style causal language model trained with a single mixed pretraining run over general Vietnamese text and a poem corpus.
This checkpoint is intended for Vietnamese text generation and research experiments around mixed-domain pretraining. It is not an instruction-tuned chat model.
GPT2LMHeadModelsafetensorsThe model was trained on a mixed Vietnamese corpus built from:
Text is normalized, tokenized, concatenated, and packed into fixed 1024-token blocks. An end-of-text token is appended between samples before packing.
This model was trained with the mixed pretraining recipe implemented in src/train_mixed.py.
Important detail: the training script loads the tokenizer and config from the project checkpoint at artifacts/checkpoints/sft_poem/final, but creates the model with AutoModelForCausalLM.from_config(config). In other words, this run uses the saved architecture/tokenizer configuration but initializes model weights from config for the mixed one-step run instead of loading pretrained weights from that checkpoint.
Saved training arguments from this checkpoint:
| Setting | Value |
|---|---|
max_steps | 18920 |
per_device_train_batch_size | 2 |
per_device_eval_batch_size | 2 |
gradient_accumulation_steps | 64 |
learning_rate | 5e-4 |
weight_decay | 0.01 |
warmup_ratio | 0.1 |
lr_scheduler_type | cosine |
bf16 | true |
fp16 | false |
eval_steps | 2000 |
save_steps | 2000 |
logging_steps | 100 |
seed | 42 |
The launch script in this project runs mixed training with torchrun --nproc_per_node=2.
189202.501312.202.8971These numbers should be treated as run-level reference metrics, not as a full benchmark.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "VLAI-AIVN/vigpt2-aio-mixed-one-step"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype="auto",
device_map="auto",
)
prompt = "Hà Nội là thủ đô của Việt Nam. "
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=120,
do_sample=True,
temperature=0.8,
top_p=0.95,
pad_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
This checkpoint comes from the Vietnamese GPT-2 pretraining project in this repository, which includes:
If you use this model, cite the repository or link back to the Hugging Face model page.