Instructions to use Vinay-11/Llama-lora-instruct-finetuning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Vinay-11/Llama-lora-instruct-finetuning with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Vinay-11/Llama-lora-instruct-finetuning")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Vinay-11/Llama-lora-instruct-finetuning", dtype="auto") - PEFT
How to use Vinay-11/Llama-lora-instruct-finetuning with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Vinay-11/Llama-lora-instruct-finetuning with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Vinay-11/Llama-lora-instruct-finetuning" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Vinay-11/Llama-lora-instruct-finetuning", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Vinay-11/Llama-lora-instruct-finetuning
- SGLang
How to use Vinay-11/Llama-lora-instruct-finetuning with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Vinay-11/Llama-lora-instruct-finetuning" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Vinay-11/Llama-lora-instruct-finetuning", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Vinay-11/Llama-lora-instruct-finetuning" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Vinay-11/Llama-lora-instruct-finetuning", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Vinay-11/Llama-lora-instruct-finetuning with Docker Model Runner:
docker model run hf.co/Vinay-11/Llama-lora-instruct-finetuning
LLaMA LoRA Instruction Fine-Tuning (FP16)
This repository contains LoRA adapter weights for a LLaMA language model fine-tuned on instruction-style question–answer data using FP16 precision. The goal is to improve instruction following and reasoning while keeping training efficient via parameter-efficient fine-tuning (PEFT).
Model Details
Base Model: LLaMA
Fine-Tuning Method: LoRA (Low-Rank Adaptation)
Precision: FP16
Task: Instruction Following / Question Answering
Frameworks: Hugging Face Transformers, PEFT, PyTorch
Checkpoint Format: .safetensors
🔹 This repository contains LoRA adapter weights only. 🔹 The base LLaMA model must be loaded separately.
Dataset
The model was fine-tuned using the FineTome-100k dataset, a curated collection of high-quality instruction–response pairs designed for supervised fine-tuning (SFT) of large language models.
Dataset Name: FineTome-100k
Type: Instruction / Q&A pairs
Size: ~100K samples
🔗 Dataset Link: https://huggingface.co/datasets/mlabonne/FineTome-100k
Training Procedure
Objective: Causal Language Modeling
Trainable Parameters: LoRA adapters only
Frozen Parameters: All base model weights
Optimizer: AdamW
Precision: FP16
Approach: Supervised Fine-Tuning (SFT)
This setup allows efficient adaptation of a large model without updating all parameters.
How to Use Requirements pip install transformers peft accelerate torch
Load Model with LoRA Adapters from transformers import AutoModelForCausalLM, AutoTokenizer from peft import PeftModel import torch
base_model_id = "meta-llama/Llama-2-7b-hf" adapter_id = "Vinay-11/Llama-lora-instruct-finetuning"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
base_model = AutoModelForCausalLM.from_pretrained( base_model_id, torch_dtype=torch.float16, device_map="auto" )
model = PeftModel.from_pretrained(base_model, adapter_id) model.eval()
Example Inference prompt = "What is LoRA fine-tuning?"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate( **inputs, max_new_tokens=120, temperature=0.7, do_sample=True )
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Model tree for Vinay-11/Llama-lora-instruct-finetuning
Base model
meta-llama/Llama-2-7b-hf