Downloads · 30 days
41
16% of all-time downloads
minhduc168/LFM2.5-VL-1.6B-Vietnamese-LoRA
LFM2.5-VL-1.6B-Vietnamese-LoRA is a image-to-text model from minhduc168. Use it when you need a caption or text from an image. It is set up for peft. The card lists the license as apache-2.0.
Đây là LoRA Adapter được tinh chỉnh để trích xuất thông tin từ hóa đơn đơn thuốc và phiếu thu tiếng Việt. Adapter này được huấn luyện trên nền mô hình gốc LiquidAI/LFM2.5-VL-1.6B.
Downloads · 30 days
41
16% of all-time downloads
All-time downloads
249
Public
Repo size
36.6 MB
Likes
0
Public
Click a slice to open those files.
.safetensors36.6 MB · 89%
From the Hugging Face model README
Đây là LoRA Adapter được tinh chỉnh để trích xuất thông tin từ hóa đơn đơn thuốc và phiếu thu tiếng Việt. Adapter này được huấn luyện trên nền mô hình gốc LiquidAI/LFM2.5-VL-1.6B.
Để sử dụng Adapter này, bạn cần tải mô hình gốc và sau đó nạp trọng số LoRA bằng thư viện peft.
from transformers import Qwen2VLForConditionalGeneration, AutoProcessor
from peft import PeftModel
import torch
model_id = "LiquidAI/LFM2.5-VL-1.6B"
adapter_id = "minhduc168/LFM2.5-VL-1.6B-Vietnamese-LoRA"
# 1. Tải mô hình gốc
model = Qwen2VLForConditionalGeneration.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
# 2. Nạp LoRA Adapter
model = PeftModel.from_pretrained(model, adapter_id)
# 3. Tải Processor
processor = AutoProcessor.from_pretrained(model_id)
model.eval()
print("Model và Adapter đã sẵn sàng!")
Các lưu ý
Base Model: Đảm bảo cài đặt thư viện peft: pip install peft
Phiên bản nén: Nếu muốn sử dụng bản đã gộp sẵn trọng số hoặc bản GGUF để tiết kiệm tài nguyên, vui lòng tham khảo tại: minhduc168/LFM2.5-VL-1.6B-Vietnamese.
Liên hệ
Nếu có bất kỳ câu hỏi nào về bộ dataset hoặc quá trình training, vui lòng mở một Discussion tại repo này!