from peft import PeftModelfrom transformers import AutoModelForCausalLM, AutoTokenizer base_model = AutoModelForCausalLM.from_pretrained( "google/gemma-4-E4B-it", device_map="auto", torch_dtype="auto",)model = PeftModel.from_pretrained(base_model, "naazimsnh02/FinanceGemma-E4B-lora")tokenizer = AutoTokenizer.from_pretrained("naazimsnh02/FinanceGemma-E4B-lora") prompt = "Classify the sentiment of this financial news: 'Apple reported record Q4 earnings, beating analyst estimates by 15%.'"messages = [{"role": "user", "content": [{"type": "text", "text": prompt}]}]inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True, return_dict=True).to(model.device)output = model.generate(**inputs, max_new_tokens=128)print(tokenizer.decode(output[0], skip_special_tokens=True))