AdvisorAI โ€” LLaMA-2-7B Fine-Tuned on Stevens Q&A Data

A QLoRA fine-tuned version of LLaMA-2-7B adapted for academic advising at Stevens Institute of Technology, trained on 87,782 domain-specific Q&A pairs.

Training Details

Parameter Value
Base Model meta-llama/Llama-2-7b-hf
Method QLoRA (4-bit NF4)
LoRA Rank / Alpha 16 / 32
Target Modules q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
Epochs 6
Learning Rate 2e-4
Effective Batch Size 32
Best Checkpoint Step 7,500
Training Platform Google Colab GPU

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig from peft import PeftModel import torch

bnb_config = BitsAndBytesConfig( load_in_4bit=True, bnb_4bit_quant_type="nf4", bnb_4bit_compute_dtype=torch.float16 )

base = AutoModelForCausalLM.from_pretrained( "meta-llama/Llama-2-7b-hf", quantization_config=bnb_config, device_map="auto" )

model = PeftModel.from_pretrained(base, "nitinchaube/advisorai-llama2-7b-stevens") tokenizer = AutoTokenizer.from_pretrained("nitinchaube/advisorai-llama2-7b-stevens")

prompt = """### Context: {paste stevens context here}

Question:

What are the concentrations in the Applied Mathematics program?

Answer:"""

inputs = tokenizer(prompt, return_tensors="pt").to("cuda") output = model.generate(**inputs, max_new_tokens=256, temperature=0.7) print(tokenizer.decode(output[0], skip_special_tokens=True))

Downloads last month
36
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for chauben/advisorai-llama2-7b-stevens

Adapter
(2342)
this model