Downloads · 30 days
5
18% of all-time downloads
islam-hajosman/llama3_instruct_fine_tuned_bahn_1k_lora_adapter
llama3_instruct_fine_tuned_bahn_1k_lora_adapter is a machine learning model from islam-hajosman. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
Model Name: islam-hajosman/llama3instructfinetunedbahn1kv1loraadapter Architecture: Llama 3 Instruct with LoRa Adaptor Quantization: 4-bit NF4 with double quantization Domain-Specific Fine-Tuning Dataset: islam-hajosm…
Downloads · 30 days
5
18% of all-time downloads
All-time downloads
28
Public
Repo size
4.5 GB
Likes
0
Public
Click a slice to open those files.
.safetensors4.4 GB · 98%
From the Hugging Face model README
Model Name: islam-hajosman/llama3_instruct_fine_tuned_bahn_1k_v1_lora_adapter
Architecture: Llama 3 Instruct with LoRa Adaptor
Quantization: 4-bit NF4 with double quantization
Domain-Specific Fine-Tuning Dataset: islam-hajosman/deutsche_bahn_faq_1k
This model card describes the LoRa adaptor fine-tuned to improve responses to FAQs from the Deutsche Bahn website. This project is part of a Master's thesis aiming to enhance domain-specific performance.
lora_config = LoraConfig(
r=16,
lora_alpha=32,
lora_dropout=0.0,
bias="none",
target_modules=['q_proj', 'k_proj', 'v_proj', 'o_proj', 'gate_proj', 'up_proj', 'down_proj'],
task_type="CAUSAL_LM"
)
model = get_peft_model(model, lora_config)
To use this LoRa adaptor model, load it from Huggingface using the model name islam-hajosman/llama3_instruct_fine_tuned_bahn_1k_v1_lora_adapter. This model is optimized for providing domain-specific answers to Deutsche Bahn FAQ.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
tokenizer = AutoTokenizer.from_pretrained("islam-hajosman/llama3_instruct_fine_tuned_bahn_1k_v1_lora_adapter")
base_model = AutoModelForCausalLM.from_pretrained("base_model_name")
model = PeftModel.from_pretrained(base_model, "islam-hajosman/llama3_instruct_fine_tuned_bahn_1k_v1_lora_adapter")
input_text = "Ihre Frage hier"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)