Views
No views yet
miromind-ai/MiroThinker-v1.0-8B (Code, Logic, Tool Use)nvidia/Nemotron-Orchestrator-8B (Planning, Structure)Kwaipilot/HiPO-8B (Reasoning Gating, Efficiency)bfloat16 precision. It uses the specific ChatML prompt template native to Qwen models.pip install torch transformers accelerate1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4# --- CONFIGURATION ---
5MODEL_PATH = "yasserrmd/Neuro-Orchestrator-8B"
6
7# Load Tokenizer & Model
8tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH)
9model = AutoModelForCausalLM.from_pretrained(
10 MODEL_PATH,
11 torch_dtype=torch.bfloat16,
12 device_map="auto",
13 trust_remote_code=True
14 )
15print("Model loaded successfully!")
16
17# --- INFERENCE FUNCTION ---
18def run_neuro_agent(prompt):
19 # Qwen/ChatML Format triggers the Orchestrator personality
20 full_prompt = (
21 f"<|im_start|>system\n"
22 f"You are Neuro-Orchestrator. Analyze the request complexity, plan, and execute.<|im_end|>\n"
23 f"<|im_start|>user\n"
24 f"{prompt}<|im_end|>\n"
25 f"<|im_start|>assistant\n"
26 )
27
28 inputs = tokenizer(full_prompt, return_tensors="pt").to("cuda")
29
30 with torch.no_grad():
31 outputs = model.generate(
32 **inputs,
33 max_new_tokens=400,
34 do_sample=True,
35 temperature=0.6,
36 repetition_penalty=1.15,
37 pad_token_id=tokenizer.eos_token_id
38 )
39
40 response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
41 return response
42
43# --- EXAMPLE USAGE ---
44print(run_neuro_agent("Plan a 3-day trip to Tokyo for a couple with a $2000 budget."))<think>
...For Week 1 focus on setup essentials... Week 2 shifts to refining... Week 3 is critical...
</think>1from PIL import Image
2import os
3
4def resize_images(input_folder):
5 # Ensure the input folder exists
6 if not os.path.exists(input_folder):
7 print(f"The folder {input_folder} does not exist.")
8 return
9
10 # List all files in the input folder
11 files = os.listdir(input_folder)
12
13 # Process each file
14 for filename in files:
15 file_path = os.path.join(input_folder, filename)
16
17 # Check if file is an image
18 if os.path.isfile(file_path) and filename.lower().endswith(('.png', '.jpg', '.jpeg')):
19 with Image.open(file_path) as img:
20 # Calculate new dimensions
21 new_width = int(img.width * 0.5)
22 new_height = int(img.height * 0.5)
23
24 # Resize and save
25 resized_img = img.resize((new_width, new_height))
26 resized_img.save(file_path)