Instructions to use Karan6124/llama3-8b-multi-dataset-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Karan6124/llama3-8b-multi-dataset-sft with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/llama-3-8b-bnb-4bit") model = PeftModel.from_pretrained(base_model, "Karan6124/llama3-8b-multi-dataset-sft") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Unsloth Studio new
How to use Karan6124/llama3-8b-multi-dataset-sft with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Karan6124/llama3-8b-multi-dataset-sft to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Karan6124/llama3-8b-multi-dataset-sft to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Karan6124/llama3-8b-multi-dataset-sft to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Karan6124/llama3-8b-multi-dataset-sft", max_seq_length=2048, )
Llama-3 8B Multi-Dataset SFT (LoRA)
This model is a fine-tuned version of Llama-3-8B aligned using Supervised Fine-Tuning (SFT) on a merged dataset of Alpaca, Dolly 15k, and OpenAssistant.
π Key Features
- Training Framework: Unsloth (LoRA)
- Datasets: Merged Instruction tuning (Alpaca, Dolly, OASST)
- Quantization: 4-bit (bitsandbytes)
- Monitoring: Tracked via Weights & Biases
π Project Links
- Full Pipeline Code: GitHub Repository
- Developer: Karan Shelar
π οΈ Usage
You can load this model using the unsloth library for ultra-fast inference:
from unsloth import FastLanguageModel
import torch
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "Karan6124/llama3-8b-multi-dataset-sft",
max_seq_length = 2048,
load_in_4bit = True,
)
FastLanguageModel.for_inference(model)
# Test prompt
instruction = "Write a clear Python function to check if a string is a palindrome."
prompt = f"### Instruction:\n{instruction}\n\n### Response:\n"
inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.batch_decode(outputs, skip_special_tokens=True)[0])
π Training Details
- Rank (r): 16
- Alpha: 32
- Learning Rate: 2e-4
- Optim: adamw_8bit
- Downloads last month
- 1
Model tree for Karan6124/llama3-8b-multi-dataset-sft
Base model
meta-llama/Meta-Llama-3-8B Quantized
unsloth/llama-3-8b-bnb-4bit