Run this model with HF Jobs
Run Karan6124/llama3-8b-multi-dataset-sft on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Karan6124/llama3-8b-multi-dataset-sft. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Karan6124/llama3-8b-multi-dataset-sft on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/Karan6124/llama3-8b-multi-dataset-sft. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/Karan6124/llama3-8b-multi-dataset-sft. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
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 Settings
- Unsloth Desktop
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
- 8
Model tree for Karan6124/llama3-8b-multi-dataset-sft
Base model
meta-llama/Meta-Llama-3-8B Quantized
unsloth/llama-3-8b-bnb-4bit