Views
No views yet
unsloth/DeepSeek-R1-Distill-Llama-8B-unsloth-bnb-4bit model using the vicgalle/alpaca-gpt4 dataset with LoRA and Unsloth's efficient training interface.1from unsloth import FastLanguageModel
2
3model, tokenizer = FastLanguageModel.from_pretrained(
4 model_name = "unsloth/DeepSeek-R1-Distill-Llama-8B-unsloth-bnb-4bit",
5 max_seq_length = max_seq_length,
6 dtype=None,
7 load_in_4bit = True,
8)1model = FastLanguageModel.get_peft_model(
2 model,
3 r = 16,
4 target_modules = [
5 "q_proj", "k_proj", "v_proj", "o_proj",
6 "gate_proj", "up_proj", "down_proj"
7 ],
8 use_rslora = True,
9)1from datasets import load_dataset
2dataset = load_dataset("vicgalle/alpaca-gpt4", split="train[:5000]")outputs/ directory.apply_chat_template() helped match conversational finetuning structure.