import torchfrom transformers import AutoTokenizer, AutoModelForCausalLM, pipeline model_id = "sivamani-31/sika-gpt" # Load tokenizer and modeltokenizer = AutoTokenizer.from_pretrained(model_id)model = AutoModelForCausalLM.from_pretrained( model_id, torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32, device_map="auto") # Text generation pipelinegenerator = pipeline("text-generation", model=model, tokenizer=tokenizer) messages = [ {"role": "system", "content": "You are Sika-GPT, an ultra-efficient open AI assistant for code and reasoning."}, {"role": "user", "content": "Write a clean Python function to find prime numbers using the Sieve of Eratosthenes:"}] formatted_prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) outputs = generator(formatted_prompt, max_new_tokens=512, temperature=0.7, do_sample=True)print(outputs[0]["generated_text"])