from transformers import AutoTokenizer, AutoModelForCausalLMimport torch model_name = "LeeChanRX/LeeChan-3B-Instruct" tokenizer = AutoTokenizer.from_pretrained(model_name)model = AutoModelForCausalLM.from_pretrained( model_name, device_map="auto", torch_dtype="auto") messages = [ { "role": "system", "content": "You are LeeChan-3B-Instruct, developed by LeeChanRX Studio." }, { "role": "user", "content": "Hello! Introduce yourself." }] text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True) inputs = tokenizer(text, return_tensors="pt").to(model.device) outputs = model.generate( **inputs, max_new_tokens=512, temperature=0.7, top_p=0.9) response = tokenizer.decode( outputs[0][inputs.input_ids.shape[-1]:], skip_special_tokens=True) print(response)