CoolFace
Modelpublic

Gaelium/Qwen2.5-14B-Drone

sourceHugging Faceotherupdated 1y agoView on Hugging Face
1likes21downloads
Model Card

Qwen2.5-Drone

This is a fine-tuned version of Qwen2.5-14B-Instruct specialized for drone control and robotic vision tasks.

Model Details

  • —Base Model: Qwen/Qwen2.5-14B-Instruct
  • —Training Technique: QLoRA fine-tuning
  • —Training Dataset: Custom drone command dataset with ReAct reasoning
  • —Use Cases: Drone control, object detection processing, robotic vision tasks

Usage

python
from transformers import AutoModelForCausalLM, AutoTokenizer

# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained("CCappy/Qwen2.5-Drone", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("CCappy/Qwen2.5-Drone", trust_remote_code=True)

# Function definitions example
function_defs = '''[
    {"type": "function", "function": {"name": "get_objects_in_view"...}}
    ...
]'''

# Example query
query = "Find a red car in the scene and hover 2 meters above it."

# Format input
input_text = f"<|im_start|>user\nYou have access to the following functions:\n{function_defs}\n\n{query}<|im_end|>\n<|im_start|>assistant\n"

# Generate response
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
outputs = model.generate(
    inputs["input_ids"],
    max_new_tokens=1024,
    temperature=0.7,
)
response = tokenizer.decode(outputs[0], skip_special_tokens=False)
print(response)

Training Details

The model was fine-tuned using QLoRA with the following parameters:

  • —LoRA rank: 16
  • —LoRA alpha: 32
  • —Dropout: 0.05
  • —Target modules: qproj, kproj, vproj, oproj (attention modules)
  • —Training epochs: 3
  • —Batch size: 8
  • —Per device train batch size: 8
  • —Per device eval batch size: 8
  • —Gradient accumulation steps: 2
  • —Learning rate: 2e-4
  • —Mixed precision: bf16
  • —Optimizer: adamwtorchfused
  • —Max gradient norm: 1.5
  • —Dataloader workers: 4
  • —Group by length: True

Limitations

This model is specialized for drone control scenarios and may not perform as well on general tasks as the base Qwen2.5 model. The model inherits limitations from the base Qwen2.5-14B-Instruct model, including potential biases and hallucinations, but has been optimized for interpreting and responding to commands in drone control contexts. This model requires specific functions that are still being tested and set up