from transformers import AutoTokenizer, AutoModelForCausalLM model_id = "arcee-ai/Homunculus"tokenizer = AutoTokenizer.from_pretrained(model_id)model = AutoModelForCausalLM.from_pretrained( model_id, torch_dtype="auto", device_map="auto") # /think mode - Chain-of-thought reasoningmessages = [ {"role": "system", "content": "You are a helpful assistant. /think"}, {"role": "user", "content": "Why is the sky blue?"},]output = model.generate( tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt"), max_new_tokens=512, temperature=0.7)print(tokenizer.decode(output[0], skip_special_tokens=True)) # /nothink mode - Direct answersmessages = [ {"role": "system", "content": "You are a helpful assistant. /nothink"}, {"role": "user", "content": "Summarize the plot of Hamlet in two sentences."},]output = model.generate( tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt"), max_new_tokens=128, temperature=0.7)print(tokenizer.decode(output[0], skip_special_tokens=True))