Downloads · 30 days
15
4% of all-time downloads
CallMeDaniel/Llama-2-7b-chat-hf_vn
Llama-2-7b-chat-hf_vn is a text generation model from CallMeDaniel. Use it when you need the model to write or continue text. It is set up for transformers.
This repository contains a Vietnamese-tuned version of the Llama-2-7b-chat-hf model, which has been fine-tuned on Vietnamese datasets using LoRA (Low-Rank Adaptation) techniques.
Downloads · 30 days
15
4% of all-time downloads
All-time downloads
359
Public
Parameters
6.7B
7.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors7 GB · 100%
How the weights are stored.
I86.5B · 96%
From the Hugging Face model README
This repository contains a Vietnamese-tuned version of the Llama-2-7b-chat-hf model, which has been fine-tuned on Vietnamese datasets using LoRA (Low-Rank Adaptation) techniques.
This model is a fine-tuned version of the Llama-2-7b-chat-hf model, specifically adapted for improved performance on Vietnamese language tasks. It uses LoRA fine-tuning to efficiently adapt the large language model to Vietnamese data while maintaining much of the original model's general knowledge and capabilities.
You can use this model directly with the Hugging Face Transformers library:
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel, PeftConfig
# Load the base model
base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b-chat-hf")
# Load the LoRA configuration and model
peft_model_id = "CallMeMrFern/Llama-2-7b-chat-hf_vn"
config = PeftConfig.from_pretrained(peft_model_id)
model = PeftModel.from_pretrained(base_model, peft_model_id)
# Load the tokenizer
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-7b-chat-hf")
# Example usage
input_text = "Xin chào, hôm nay thời tiết thế nào?"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs, max_length=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
[More Information Needed]
[More Information Needed]
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
Use the code below to get started with the model.
[More Information Needed]
Dataset: alpaca_translate_GPT_35_10_20k.json (Vietnamese translation of the Alpaca dataset)
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
[More Information Needed]
If you use this model in your research, please cite:
@misc{vietnamese_llama2_7b_chat,
author = {[Your Name]},
title = {Vietnamese Fine-tuned Llama-2-7b-chat-hf},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://huggingface.co/CallMeMrFern/Llama-2-7b-chat-hf_vn}}
}
The following bitsandbytes quantization config was used during training:
This model is a fine-tuned version of the Llama-2-7b-chat-hf model, specifically adapted for improved performance on Vietnamese language tasks. It uses LoRA fine-tuning to efficiently adapt the large language model to Vietnamese data while maintaining much of the original model's general knowledge and capabilities.
["q_proj", "v_proj"]alpaca_translate_GPT_35_10_20k.json (Vietnamese translation of the Alpaca dataset)The model was fine-tuned using the following command:
python finetune/lora.py \
--base_model meta-llama/Llama-2-7b-chat-hf \
--model_type llama \
--data_dir data/general/alpaca_translate_GPT_35_10_20k.json \
--output_dir finetuned/meta-llama/Llama-2-7b-chat-hf \
--lora_target_modules '["q_proj", "v_proj"]' \
--micro_batch_size 1
For multi-GPU training, a distributed training approach was used.
[Include any evaluation results, perplexity scores, or benchmark performances here]