import torchfrom transformers import AutoModelForCausalLM, AutoTokenizerfrom peft import PeftModel base_model_id = "meta-llama/Llama-3.2-3B-Instruct"adapter_id = "CorpIntel-HR-Agent" # Replace with your Hugging Face username/repo tokenizer = AutoTokenizer.from_pretrained(base_model_id)base_model = AutoModelForCausalLM.from_pretrained( base_model_id, torch_dtype=torch.bfloat16, device_map="auto") model = PeftModel.from_pretrained(base_model, adapter_id) prompt = """<|start_header_id|>system<|end_header_id|>You are an elite HR Business Partner AI. Your objective is to evaluate heterogeneous employee telemetry to model attrition risk and generate a Managerial Intervention Plan.<|eot_id|><|start_header_id|>user<|end_header_id|>Evaluate Candidate: Sales Executive | Travel: Frequently | Distance From Home: 24 miles | Monthly Income: 3200 | OverTime: Yes | JobSatisfaction: 1 | YearsSinceLastPromotion: 4<|eot_id|><|start_header_id|>assistant<|end_header_id|>""" inputs = tokenizer(prompt, return_tensors="pt").to("cuda")outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.3)print(tokenizer.decode(outputs[0], skip_special_tokens=True))