import torchfrom transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig model_id = "kiel2/Kiel-2.1-Sol" # Optimal setup matching the API environmentquantization_config = BitsAndBytesConfig(load_in_4bit=True) tokenizer = AutoTokenizer.from_pretrained(model_id)model = AutoModelForCausalLM.from_pretrained( model_id, quantization_config=quantization_config, device_map="auto") messages = [ {"role": "user", "content": "Hello! Introduce yourself as the Kiel-2.1-Sol assistant."}] inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to("cuda")outputs = model.generate(inputs, max_new_tokens=256, temperature=0.7)print(tokenizer.decode(outputs[0], skip_special_tokens=True))CitationCode snippet@misc{kiel2-Kiel-2.1-Sol-2026, author = {KielTech}, title = {Kiel-2.1-Sol: Lightweight Conversational Language Model}, year = {2026}, publisher = {Hugging Face}, journal = {Hugging Face Repository}, howpublished = {\url{[https://huggingface.co/kiel2/Kiel-2.1-Sol](https://huggingface.co/kiel2/Kiel-2.1-Sol)}}}