from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("khazarai/Qwen3-4B-Kimi2.5-Reasoning-Distilled")model = AutoModelForCausalLM.from_pretrained( "khazarai/Qwen3-4B-Kimi2.5-Reasoning-Distilled", device_map={"": 0}) question = """You are the Head of Strategy at a mid-sized AI startup. Your company has two options for the next 2 years:- Option A: Invest heavily in fine-tuning open-source LLMs for niche domains (e.g., healthcare, legal).- Option B: Build a proprietary foundation model from scratch. You have the following constraints:- Budget: $20M total- Team: 25 engineers (strong in ML, limited infra experience)- Time horizon: 24 months- Market: Highly competitive, dominated by large players (OpenAI, Google, Anthropic) Tasks: 1. Construct a decision framework (e.g., expected value, risk-adjusted return, or strategic positioning).2. Identify key uncertainties and how you would model them.3. Recommend one option and justify it rigorously.4. Describe a contingency plan if your chosen strategy fails within 12 months.""" messages = [ {"role" : "user", "content" : question}]text = tokenizer.apply_chat_template( messages, tokenize = False, add_generation_prompt = True, enable_thinking = True,) from transformers import TextStreamer_ = model.generate( **tokenizer(text, return_tensors = "pt").to("cuda"), max_new_tokens = 2048, temperature = 0.6, top_p = 0.95, top_k = 20, streamer = TextStreamer(tokenizer, skip_prompt = True),)