sang-buster
commited on
Commit
·
c669b9a
1
Parent(s):
7de117f
style: update readme
Browse files
README.md
CHANGED
@@ -8,4 +8,168 @@ pipeline_tag: text-classification
|
|
8 |
tags:
|
9 |
- Speech Recognition
|
10 |
- ATC
|
11 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
tags:
|
9 |
- Speech Recognition
|
10 |
- ATC
|
11 |
+
---
|
12 |
+
|
13 |
+
# ATC Communication Expert Model
|
14 |
+
|
15 |
+
A fine-tuned model specialized in improving and analyzing Air Traffic Control (ATC) communications, extracting relevant information from raw transcripts.
|
16 |
+
|
17 |
+
## Model Details
|
18 |
+
|
19 |
+
### Model Description
|
20 |
+
|
21 |
+
This model is a fine-tuned version of Llama-3.2-3B-Instruct optimized for processing Air Traffic Control communications. It can:
|
22 |
+
|
23 |
+
- Improve raw ATC transcripts with proper punctuation and formatting
|
24 |
+
- Identify communication intentions (pilot requests, ATC instructions, etc.)
|
25 |
+
- Extract key information such as flight numbers, altitudes, headings, and other numerical data
|
26 |
+
- Analyze speaker roles and communication patterns
|
27 |
+
|
28 |
+
The model was fine-tuned using LoRA (Low-Rank Adaptation) with PEFT (Parameter-Efficient Fine-Tuning) techniques to efficiently adapt the Llama 3.2 model to this specialized domain.
|
29 |
+
|
30 |
+
- **Developed by:** ATC NLP Team
|
31 |
+
- **Model type:** Fine-tuned Llama 3.2 with LoRA adapters
|
32 |
+
- **Language(s):** English, specialized for ATC terminology
|
33 |
+
- **License:** Same as the base model (Llama 3.2)
|
34 |
+
- **Finetuned from model:** meta-llama/Llama-3.2-3B-Instruct
|
35 |
+
|
36 |
+
## Uses
|
37 |
+
|
38 |
+
### Direct Use
|
39 |
+
|
40 |
+
This model is intended for:
|
41 |
+
- Transcribing and formatting raw ATC communications
|
42 |
+
- Training ATC communication skills
|
43 |
+
- Analyzing ATC communication patterns
|
44 |
+
- Extracting structured data from ATC communications
|
45 |
+
- Educational purposes for those learning ATC communication protocols
|
46 |
+
|
47 |
+
### Downstream Use
|
48 |
+
|
49 |
+
The model can be integrated into:
|
50 |
+
- Air traffic management training systems
|
51 |
+
- Communication analysis tools
|
52 |
+
- ATC transcript post-processing pipelines
|
53 |
+
- Aviation safety monitoring systems
|
54 |
+
- Radio communication enhancement systems
|
55 |
+
|
56 |
+
### Out-of-Scope Use
|
57 |
+
|
58 |
+
This model is not suitable for:
|
59 |
+
- Real-time ATC operations or safety-critical decision-making
|
60 |
+
- Full language translation (it's specialized for ATC terminology only)
|
61 |
+
- General language processing outside the ATC domain
|
62 |
+
- Any application where model errors could impact flight safety
|
63 |
+
|
64 |
+
## Bias, Risks, and Limitations
|
65 |
+
|
66 |
+
- The model is specialized for ATC communications and may not perform well on general text
|
67 |
+
- It may have limitations with accents or non-standard ATC phraseology
|
68 |
+
- Performance depends on audio transcription quality for real-world applications
|
69 |
+
- Not intended for safety-critical applications without human verification
|
70 |
+
- May have biases based on the training data distribution
|
71 |
+
|
72 |
+
### Recommendations
|
73 |
+
|
74 |
+
- Always have human verification for safety-critical applications
|
75 |
+
- Use in conjunction with standard ATC protocols, not as a replacement
|
76 |
+
- Provide clear domain context for optimal performance
|
77 |
+
- Test thoroughly with diverse ATC communications before deployment
|
78 |
+
- Consider fine-tuning further on your specific ATC subdomain if needed
|
79 |
+
|
80 |
+
## How to Get Started with the Model
|
81 |
+
|
82 |
+
```python
|
83 |
+
from peft import PeftModel
|
84 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
85 |
+
|
86 |
+
# Load the model with LoRA adapters
|
87 |
+
base_model = AutoModelForCausalLM.from_pretrained(
|
88 |
+
"meta-llama/Llama-3.2-3B-Instruct",
|
89 |
+
torch_dtype="auto",
|
90 |
+
device_map="auto"
|
91 |
+
)
|
92 |
+
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-3B-Instruct")
|
93 |
+
model = PeftModel.from_pretrained(base_model, "path_to_adapters")
|
94 |
+
|
95 |
+
# Alternatively, use the merged model if available
|
96 |
+
# model = AutoModelForCausalLM.from_pretrained("path_to_merged_model")
|
97 |
+
# tokenizer = AutoTokenizer.from_pretrained("path_to_merged_model")
|
98 |
+
|
99 |
+
# Process an ATC message
|
100 |
+
instruction = "As an ATC communication expert, improve this transcript and analyze its intentions and data."
|
101 |
+
message = "southwest five niner two turn left heading three four zero descend and maintain flight level two five zero"
|
102 |
+
|
103 |
+
prompt = f"<|begin_of_text|><|header_start|>user<|header_end|>\n\n{instruction}\n\nOriginal: {message}<|eot|><|header_start|>assistant<|header_end|>\n\n"
|
104 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
105 |
+
|
106 |
+
# Generate improved transcript and analysis
|
107 |
+
outputs = model.generate(**inputs, max_new_tokens=512, do_sample=False)
|
108 |
+
response = tokenizer.decode(outputs[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True)
|
109 |
+
print(response)
|
110 |
+
```
|
111 |
+
|
112 |
+
## Training Details
|
113 |
+
|
114 |
+
### Training Data
|
115 |
+
|
116 |
+
The model was trained on a dataset of ATC communications with:
|
117 |
+
- Original raw transcripts
|
118 |
+
- Properly punctuated and formatted versions
|
119 |
+
- Annotated intentions (PSC, PSR, PRP, PRQ, PRB, PAC, ASC, AGI, ACR, END)
|
120 |
+
- Extracted numerical data (altitudes, headings, flight numbers, etc.)
|
121 |
+
- Speaker and listener information
|
122 |
+
|
123 |
+
### Training Procedure
|
124 |
+
|
125 |
+
The model was fine-tuned using LoRA with the following approach:
|
126 |
+
- Parameter-efficient fine-tuning using PEFT
|
127 |
+
- LoRA applied to key attention layers (q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj)
|
128 |
+
- Optimized with Unsloth for efficiency
|
129 |
+
|
130 |
+
#### Training Hyperparameters
|
131 |
+
|
132 |
+
- **Base model:** meta-llama/Llama-3.2-3B-Instruct
|
133 |
+
- **LoRA rank:** 16
|
134 |
+
- **LoRA alpha:** 16
|
135 |
+
- **Learning rate:** 2e-4
|
136 |
+
- **Batch size:** 4
|
137 |
+
- **Gradient accumulation steps:** 4
|
138 |
+
- **Epochs:** 3
|
139 |
+
- **Warmup ratio:** 0.03
|
140 |
+
- **Max sequence length:** 2048
|
141 |
+
- **Training regime:** BF16 mixed precision where available, FP16 otherwise
|
142 |
+
- **Optimizer:** AdamW 8-bit
|
143 |
+
|
144 |
+
## Evaluation
|
145 |
+
|
146 |
+
### Testing Data, Factors & Metrics
|
147 |
+
|
148 |
+
#### Testing Data
|
149 |
+
|
150 |
+
The model was tested on a diverse set of ATC communications, including:
|
151 |
+
- Clearances and instructions
|
152 |
+
- Pilot requests and reports
|
153 |
+
- Emergency communications
|
154 |
+
- Different accents and speaking patterns
|
155 |
+
|
156 |
+
## Technical Specifications
|
157 |
+
|
158 |
+
### Model Architecture and Objective
|
159 |
+
|
160 |
+
- **Base architecture:** Llama-3.2-3B-Instruct
|
161 |
+
- **Fine-tuning method:** LoRA with PEFT
|
162 |
+
- **Optimization library:** Unsloth
|
163 |
+
- **Training objective:** Improving and analyzing ATC communications
|
164 |
+
|
165 |
+
### Compute Infrastructure
|
166 |
+
|
167 |
+
- **Framework versions:**
|
168 |
+
- PEFT 0.15.2
|
169 |
+
- Unsloth (latest version used during training)
|
170 |
+
- Transformers (compatible with the base model)
|
171 |
+
- PyTorch (with BF16 support where available)
|
172 |
+
|
173 |
+
## Model Card Contact
|
174 |
+
|
175 |
+
For issues or questions about this model, please open an discussion in the repository.
|