from transformers import AutoModelForCausalLM, AutoTokenizerimport torch MODEL_ID = "chauben/advisorai-qwen2.5-14b-stevens" tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True)model = AutoModelForCausalLM.from_pretrained( MODEL_ID, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True,) messages = [ { "role": "system", "content": ( "You are AdvisorAI, a knowledgeable academic advisor for " "Stevens Institute of Technology. Be specific — cite course codes " "and requirements when available. Use markdown." ), }, {"role": "user", "content": "What are the requirements for the CS MS program at Stevens?"},] text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)inputs = tokenizer(text, return_tensors="pt").to(model.device) with torch.no_grad(): outputs = model.generate( **inputs, max_new_tokens=512, temperature=0.3, top_p=0.9, do_sample=True, repetition_penalty=1.05, pad_token_id=tokenizer.eos_token_id, ) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)) Citation:@misc{advisorai-qwen25-14b-stevens-2026, title = {AdvisorAI: Fine-Tuned Qwen2.5-14B for Stevens Institute Academic Advising}, author = {Nitin Chaube}, year = {2026}, howpublished = {\url{https://huggingface.co/chauben/advisorai-qwen2.5-14b-stevens}}, note = {Fine-tuned from Qwen/Qwen2.5-14B-Instruct; QDoRA + NEFTune}}