Downloads · 30 days
0
Karishma0112/llama-2-7b-qlora-instruct
llama-2-7b-qlora-instruct is a machine learning model from Karishma0112. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Karishma0112/Llama-2-7B QLoRA Instruct Model
Downloads · 30 days
0
Access
Public
Updated Aug 6, 2026
Repo size
134 MB
Likes
0
Public
Click a slice to open those files.
.safetensors134 MB · 100%
From the Hugging Face model README
Karishma0112/Llama-2-7B QLoRA Instruct Model
language:
Developed by: Karishma Chougule Model type: Large Language Model (LLM)
This model is a QLoRA fine-tuned version of Meta's Llama 2 7B language model. The model was fine-tuned using Parameter Efficient Fine-Tuning (PEFT) with Low-Rank Adaptation (LoRA) and 4-bit quantization to reduce memory requirements while maintaining model performance.
The objective of this fine-tuning is to improve the model's ability to follow instructions and generate more relevant, coherent responses.
| Item | Value |
|---|---|
| Base Model | NousResearch/Llama-2-7b-chat-hf |
| Model Type | Decoder-only Large Language Model |
| Fine-Tuning Method | PEFT |
| Technique | QLoRA |
| Training Method | Supervised Fine-Tuning (SFT) |
| Framework | Hugging Face Transformers |
| Trainer | TRL SFTTrainer |
| Quantization | 4-bit |
| Dataset | mlabonne/guanaco-llama2-1k |
| Adapter Type | LoRA |
Base Model: https://huggingface.co/meta-llama/Llama-2-7b-hf Fine-tuning Framework: Hugging Face Transformers + PEFT + BitsAndBytes
This model can be used for:
Potential applications:
This model should not be used for:
Large language models may:
Users should validate model outputs before using them in production systems.
from transformers import AutoModelForCausalLM, AutoTokenizer from peft import PeftModel
base_model = "NousResearch/Llama-2-7b-chat-hf"
adapter_model = "Karishma0112/llama-2-7b-qlora-instruct"
tokenizer = AutoTokenizer.from_pretrained( base_model )
model = AutoModelForCausalLM.from_pretrained( base_model, load_in_4bit=True, device_map="auto" )
model = PeftModel.from_pretrained( model, adapter_model )
prompt = "Explain machine learning in simple terms"
inputs = tokenizer( prompt, return_tensors="pt" ).to(model.device)
outputs = model.generate( **inputs, max_new_tokens=150 )
print( tokenizer.decode( outputs[0], skip_special_tokens=True ) )
Training data was:
The model was trained using:
Example:
The model was evaluated based on:
Install dependencies:
pip install transformers peft accelerate bitsandbytes