Files
TASX-Cmd-0.5B-GGUF/README.md

120 lines
4.2 KiB
Markdown
Raw Normal View History

---
language:
- en
tags:
- robotics
- ros2
- json
- unsloth
- qwen
- text-generation
- hardware
base_model: ReXeeD/TASX-Cmd-0.5B
pipeline_tag: text-generation
license: apache-2.0
---
# TASX-Command-0.5B
**TASX-Command-0.5B** is a highly specialized, lightweight language model designed specifically for robotics. It translates natural language (including slang, typos, and complex phrasing) into strict, execution-ready JSON command sequences for ROS2, SLAM, and physical robot control.
By fine-tuning the **Qwen2.5-0.5B** base model, we created a "robot brain" that is small and fast enough to run locally on edge hardware (like a Raspberry Pi) via `llama.cpp` while retaining the intelligence to understand complex human intent.
## Quantized Versions (GGUF)
For high-performance inference , use these GGUF quants:
* **[TASX-Cmd-0.5B-GGUF (mradermacher)](https://huggingface.co/mradermacher/TASX-Cmd-0.5B-GGUF)** — *Includes high-quality iMatrix and IQ quants.*
## Key Features
* **Strict JSON Output:** Never outputs conversational filler; only valid JSON arrays.
* **Typo & Slang Immunity:** Successfully maps messy speech (e.g., "scoot forward lik 3 point 5 meeters") to perfect floats and commands.
* **Dynamic Location Extraction:** Converts any spoken room or location name (e.g., "Professor Xavier's Office") into clean `snake_case` (e.g., `professor_xavier_office`).
* **Physical Constraint Logic:** Automatically generates implicit macro sequences (like `sit` -> `stand` -> `move`) for fetching and delivering items without needing explicit user instruction.
---
## Supported Actions & Commands
The model is trained to strictly output one or more of the following 20 commands formatted as a JSON array of `actions`.
### 1. Teleop (Movement & Speed)
* `{"type": "teleop", "cmd": "move_forward", "distance": <float>}`
* `{"type": "teleop", "cmd": "move_backward", "distance": <float>}`
* `{"type": "teleop", "cmd": "rotate_left", "angle": <float>}`
* `{"type": "teleop", "cmd": "rotate_right", "angle": <float>}`
* `{"type": "teleop", "cmd": "set_speed", "level": "slow" | "normal" | "fast"}`
* `{"type": "teleop", "cmd": "stop"}` *(For casual pauses)*
* `{"type": "teleop", "cmd": "e_stop"}` *(For panicked/emergency stops)*
### 2. Nav2 (Autonomous Navigation)
* `{"type": "nav2", "cmd": "go_to_waypoint", "target": "<snake_case_string>"}`
* `{"type": "nav2", "cmd": "cancel_goal"}`
### 3. Stunts (Posture & Tricks)
* `{"type": "stunt", "cmd": "full_sit"}`
* `{"type": "stunt", "cmd": "half_sit"}`
* `{"type": "stunt", "cmd": "stand_up"}`
* `{"type": "stunt", "cmd": "spin", "direction": "clockwise" | "anticlockwise"}`
---
## Advanced Behaviors (Macros)
TASX-Command-0.5B has been taught physical robotics logic. It knows a robot cannot drive while sitting.
If you ask it to perform a delivery (e.g., *"Fetch my laptop from the server room and bring it to John's desk"*), it will automatically output the required posture macros:
```json
{
"actions": [
{"type": "nav2", "cmd": "go_to_waypoint", "target": "server_room"},
{"type": "stunt", "cmd": "full_sit"},
{"type": "stunt", "cmd": "stand_up"},
{"type": "nav2", "cmd": "go_to_waypoint", "target": "john_desk"},
{"type": "stunt", "cmd": "full_sit"}
]
}
```
## Test Script
```
from llama_cpp import Llama
print("⏳ Loading model... please wait.")
llm = Llama(
model_path="./tasx_sft_merged_gguf/tasx_sft_merged.Q8_0.gguf",
n_ctx=512,
stop=["<|im_end|>"],
verbose=False
)
print("\n" + "="*50)
print("TASX ROBOT ")
print("Type a command and press Enter. Type 'q' to quit.")
print("="*50 + "\n")
while True:
user_text = input("🎤 You: ")
if user_text.lower() in ['q', 'quit', 'exit']:
print("Stopping tester. Great job!")
break
if not user_text.strip():
continue
prompt = f"<|im_start|>user\n{user_text}<|im_end|>\n<|im_start|>assistant\n"
output = llm(
prompt,
max_tokens=150,
temperature=0,
echo=False
)
response = output["choices"][0]["text"].strip()
print(f"TASX: {response}\n")
```
## Contact
Need a custom version of this model for your specific robot's API or hardware? Contact: [albinthomas7034@gmail.com]