1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "muverqqw/Noir-Mini"
4tokenizer = AutoTokenizer.from_pretrained(model_name)
5model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", torch_dtype="auto")
6
7messages = [
8 {"role": "system", "content": "You are Noir-Mini, a precise and creative AI."},
9 {"role": "user", "content": "If I have 3 apples and give 1 to a friend who then gives me 2 oranges, how many fruits do I have in total?"}
10]
11
12# Recommended for Noir-Mini: Temp 0.4-0.6 for logic, 0.7+ for stories
13input_ids = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to("cuda")
14gen_tokens = model.generate(input_ids, max_new_tokens=256, temperature=0.5, do_sample=True)
15
16print(tokenizer.batch_decode(gen_tokens, skip_special_tokens=True)[0])
-
Architecture: Qwen 2.5 (1.5B)
-
Training Context: 32k tokens.
-
Specialty: Logic-heavy instructions and bilingual (EN/RU) support.