SAI-for-VinFast
Collection
AI assistant fine-tuned from SAI for VinFast vehicle control • 6 items • Updated • 1
Checkpoint SAI-for-VinFast 375M, dành cho tác vụ trợ lí ảo trên xe VinFast. Có 375.194.624 tham số, 24 layer, d_model=1024, 16 query head và 4 KV head.
Bản FP32 gốc sau fine-tune, chưa quantize. Tải toàn bộ folder này để có
checkpoint, config, tokenizer và code model/inference cần thiết.
File trọng số: SAI-for-VinFast-FP32_375M.pt.
python -m pip install -r requirements.txt
python run.py "Tôi muốn tìm hiểu về xe điện VinFast." --max-new-tokens 64
Dùng loader SAI đi kèm; không dùng AutoModelForCausalLM.
Để chat nhiều lượt với beam search và tái sử dụng KV cache của phần hội thoại chung:
from pathlib import Path
import sentencepiece as spm
from src.inference.chat import SaiChat, load_model
model = load_model(Path("SAI-for-VinFast-FP32_375M.pt"), Path("config.json"), max_seq_len=10240)
tokenizer = spm.SentencePieceProcessor(model_file="tokenizer.model")
chat = SaiChat(model, tokenizer, context_size=10240)
messages = [{"role": "user", "content": "Tôi muốn tìm hiểu về xe điện VinFast."}]
print(chat.complete(messages, max_tokens=64)["text"])