Downloads · 30 days
0
duyddinh351/Lisa-LoRA-Llama3.1-8B-v1
Lisa-LoRA-Llama3.1-8B-v1 is a text generation model from duyddinh351. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as llama3.1.
A LoRA fine-tuned variant of Llama 3.1–8B Instruct, specialized for Vietnamese travel visa consultation. This model powers “Lisa”, the AI assistant for SaigonTimes Travel, designed to provide natural, accurate, and st…
Downloads · 30 days
0
Access
Public
Updated Nov 26, 2025
Repo size
147 MB
Likes
0
Public
Click a slice to open those files.
.safetensors65.1 MB · 79%
From the Hugging Face model README
A LoRA fine-tuned variant of Llama 3.1–8B Instruct, specialized for Vietnamese travel visa consultation.
This model powers “Lisa”, the AI assistant for SaigonTimes Travel, designed to provide natural, accurate, and structured guidance for visa applications.
Lisa-Visa-LoRA-Llama-v2 is a LoRA adapter trained on a curated visa-focused dataset containing 4,600 conversational samples, including:
The model improves:
The model was fine-tuned on 4,600 hand-curated and synthetic visa-related samples, formatted in ChatML (messages format).
| Split | Count |
|---|---|
| Train | 80% |
| Validation | 10% |
| Test | 10% |
Public dataset:
👉 duyddinh351/visa-dataset
| Parameter | Value |
|---|---|
| LoRA Rank | 64 |
| LoRA Alpha | 16 |
| LoRA Dropout | 0.05 |
| Bits | 4-bit NF4 |
| LR | 2e-4 |
| Scheduler | Cosine |
| Epochs | 3 |
| Max seq length | 4,096 |
Note: This model is domain-specialized; generic LLM benchmarks (MMLU, GSM8K) are not relevant.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = "meta-llama/Llama-3.1-8B-Instruct"
lora = "duyddinh351/Lisa-Visa-LoRA-Llama-v2"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, device_map="auto")
model = PeftModel.from_pretrained(model, lora)
prompt = "What documents do I need to apply for a Japan tourist visa?"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=300)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
base_model: meta-llama/Llama-3.1-8B-Instruct
library_name: peft
model_name: LISA_llma3.1_v2
tags:
- base_model:adapter:meta-llama/Llama-3.1-8B-Instruct
- lora
- sft
- transformers
- trl
licence: license
pipeline_tag: text-generation
---
# Model Card for LISA_llma3.1_v2
This model is a fine-tuned version of [meta-llama/Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct).
It has been trained using [TRL](https://github.com/huggingface/trl).
## Quick start
```python
from transformers import pipeline
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
generator = pipeline("text-generation", model="None", device="cuda")
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
print(output["generated_text"])
This model was trained with SFT.
Cite TRL as:
@misc{vonwerra2022trl,
title = {{TRL: Transformer Reinforcement Learning}},
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
year = 2020,
journal = {GitHub repository},
publisher = {GitHub},
howpublished = {\url{https://github.com/huggingface/trl}}
}