Views
No views yet

1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "TomBombadyl/Qwen2.5-Coder-7B-Instruct-Omni1.1"
4tokenizer = AutoTokenizer.from_pretrained(model_name)
5model = AutoModelForCausalLM.from_pretrained(model_name)
6
7# Isaac Sim robotics query
8query = """<|im_start|>user
9How do I create a robot with differential drive in Isaac Sim 5.0?
10<|im_end|>
11<|im_start|>assistant"""
12
13inputs = tokenizer(query, return_tensors="pt")
14outputs = model.generate(**inputs, max_length=512)
15response = tokenizer.decode(outputs[0], skip_special_tokens=True)
16print(response)1from ctransformers import AutoModelForCausalLM
2
3model = AutoModelForCausalLM.from_pretrained(
4 "TomBombadyl/Qwen2.5-Coder-7B-Instruct-Omni1.1",
5 model_type="qwen2",
6 gpu_layers=0 # CPU inference
7)
8
9# Same usage pattern as above1# Convert to GGUF format for llama.cpp
2python scripts/convert_to_gguf.py
3
4# Use with llama.cpp
5./llama-server --model models/gguf/isaac_sim_qwen2.5_coder_q4_0.gguf --port 80801# Clone repository
2git clone https://github.com/TomBombadyl/Qwen2.5-Coder-7B-Instruct-Omni1.1.git
3cd Qwen2.5-Coder-7B-Instruct-Omni1.1
4
5# Install dependencies
6pip install -r requirements.txt
7
8# Download models (choose one)
9# Option 1: HuggingFace (5.3GB)
10huggingface-cli download TomBombadyl/Qwen2.5-Coder-7B-Instruct-Omni1.1 --local-dir models/huggingface
11
12# Option 2: CTransformers (5.2GB)
13huggingface-cli download TomBombadyl/Qwen2.5-Coder-7B-Instruct-Omni1.1 --local-dir models/ctransformers
14
15# Option 3: GGUF (616MB + conversion)
16huggingface-cli download TomBombadyl/Qwen2.5-Coder-7B-Instruct-Omni1.1 --local-dir models/gguf1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model = AutoModelForCausalLM.from_pretrained("TomBombadyl/Qwen2.5-Coder-7B-Instruct-Omni1.1")
4tokenizer = AutoTokenizer.from_pretrained("TomBombadyl/Qwen2.5-Coder-7B-Instruct-Omni1.1")
5
6query = """<|im_start|>user
7Create a Python script to spawn a UR5 robot in Isaac Sim 5.0 with proper physics properties.
8<|im_end|>
9<|im_start|>assistant"""
10
11# Generate response
12inputs = tokenizer(query, return_tensors="pt")
13outputs = model.generate(**inputs, max_length=1024, temperature=0.7)
14response = tokenizer.decode(outputs[0], skip_special_tokens=True)
15print(response)1query = """<|im_start|>user
2How do I add a depth camera to my robot and process the depth data in Isaac Sim?
3<|im_end|>
4<|im_start|>assistant"""qwen2.context_length field1# Use 8-bit quantization
2model = AutoModelForCausalLM.from_pretrained(
3 "TomBombadyl/Qwen2.5-Coder-7B-Instruct-Omni1.1",
4 load_in_8bit=True,
5 device_map="auto"
6)