File size: 3,142 Bytes
1f65ffa
5f15f77
 
 
 
1f65ffa
8e21b19
1f65ffa
 
5f15f77
0af933c
1f65ffa
 
0af933c
5f15f77
98c5195
5f15f77
98c5195
5f15f77
98c5195
 
 
 
5f15f77
98c5195
5f15f77
98c5195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8e21b19
c3abc84
98c5195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
---
title: Robot Task Planning - Llama 3.1 8B
emoji: ๐Ÿค–
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 4.32.2
app_file: app.py
pinned: false
license: llama3.1
hardware: t4-medium
---

# ๐Ÿค– Robot Task Planning - Llama 3.1 8B

This Space demonstrates a fine-tuned version of Meta's **Llama 3.1 8B** model specialized for **robot task planning** using QLoRA (4-bit quantization + LoRA) technique.

## ๐ŸŽฏ Purpose

Convert natural language commands into structured task sequences for construction robots including:
- **Excavators** - Digging, loading, positioning
- **Dump Trucks** - Material transport, loading, unloading  
- **Multi-robot Coordination** - Complex task dependencies

## ๐Ÿ”— Model

**Fine-tuned Model**: [YongdongWang/llama-3.1-8b-dart-qlora](https://huggingface.co/YongdongWang/llama-3.1-8b-dart-qlora)

**Base Model**: [meta-llama/Llama-3.1-8B](https://huggingface.co/meta-llama/Llama-3.1-8B)

## โœจ Features

- ๐ŸŽฎ **Interactive Chat Interface** - Real-time robot command processing
- โš™๏ธ **Configurable Generation** - Adjust temperature, top-p, max tokens
- ๐Ÿ“ **Example Commands** - Pre-built scenarios to get started
- ๐Ÿš€ **Optimized Performance** - 4-bit quantization for efficient inference
- ๐Ÿ“Š **Structured Output** - JSON-formatted task sequences

## ๐Ÿš€ Usage

1. **Input**: Natural language robot commands
   ```
   "Deploy Excavator 1 to Soil Area 1 for excavation"
   ```

2. **Output**: Structured task sequences
   ```json
   {
     "tasks": [
       {
         "robot": "Excavator_1",
         "action": "move_to",
         "target": "Soil_Area_1",
         "duration": 30
       },
       {
         "robot": "Excavator_1", 
         "action": "excavate",
         "target": "Soil_Area_1",
         "duration": 120
       }
     ]
   }
   ```

## ๐Ÿ› ๏ธ Technical Details

- **Architecture**: Llama 3.1 8B + QLoRA adapters
- **Quantization**: 4-bit (NF4) with double quantization
- **Framework**: Transformers + PEFT + BitsAndBytesConfig
- **Interface**: Gradio 4.32.2 (stable version)
- **Hardware**: T4-MEDIUM (16GB VRAM)

## โšก Performance Notes

- **First Load**: 3-5 minutes (model downloading + loading)
- **Subsequent Generations**: ~2-10 seconds per response
- **Memory Usage**: ~8GB VRAM with 4-bit quantization
- **Context Length**: Up to 2048 tokens

## ๐Ÿ“š Example Commands

Try these robot commands:

- `"Deploy Excavator 1 to Soil Area 1 for excavation"`
- `"Send Dump Truck 1 to collect material, then unload at storage"`
- `"Coordinate multiple excavators across different areas"`
- `"Create evacuation sequence for all robots from dangerous zone"`

## ๐Ÿ”ฌ Research Applications

This model demonstrates:
- **Natural Language โ†’ Robot Planning** translation
- **Multi-agent Task Coordination** 
- **Efficient LLM Fine-tuning** with QLoRA
- **Real-time Robot Command Processing**

## ๐Ÿ“„ License

This project uses Meta's Llama 3.1 license. Please review the license terms before use.

## ๐Ÿค Contributing

For issues, improvements, or questions about the model, please visit the [model repository](https://huggingface.co/YongdongWang/llama-3.1-8b-dart-qlora).