Views
No views yet
meta-llama/Llama-3.1-8B-Instructreadback_correct=True pairsinstruction_readback, checkin_response, and question_answer exchange typesreadback_correct=False), filler words, non-ICAO phrases, exchanges under 3 or over 40 tokensreadback_correct=True by human experts, ORUH, UM, THANKS, SIR, OKAY, etc.)GONNA, THAT'S, VERY GOOD, etc.)SFTTrainerq_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj| Epoch | Train Loss | Eval Loss | Token Accuracy |
|---|---|---|---|
| 1 | 0.862 | 0.385 | 90.6% |
| 2 | 0.369 | 0.327 | 91.2% |
| 3 | 0.274 | 0.302 | 91.7% |
| 4 | 0.193 | 0.302 | 92.6% |
| 5 | 0.136 | 0.315 | 92.6% |
readback_correct field)You are a pilot responding to Air Traffic Control (ATC) transmissions.
Respond concisely using ICAO radiotelephony phraseology.
Always readback key instructions and values exactly as given.
End every transmission with your callsign.1from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
2from peft import PeftModel
3import torch
4
5BASE_MODEL = "meta-llama/Llama-3.1-8B-Instruct"
6LORA_REPO = "Sabine-Brunswicker/ATC-LLAMA-LORA"
7
8tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL)
9base = AutoModelForCausalLM.from_pretrained(
10 BASE_MODEL, torch_dtype=torch.bfloat16, device_map="auto"
11)
12model = PeftModel.from_pretrained(base, LORA_REPO)
13model = model.merge_and_unload() # fuse adapter for faster inference
14
15pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
16
17SYSTEM_PROMPT = (
18 "You are a pilot responding to Air Traffic Control (ATC) transmissions. "
19 "Respond concisely using ICAO radiotelephony phraseology. "
20 "Always readback key instructions and values exactly as given. "
21 "End every transmission with your callsign."
22)
23
24messages = [
25 {"role": "system", "content": SYSTEM_PROMPT},
26 {"role": "user", "content": "ATC: Ultra One Two Three, turn left heading two four zero, descend and maintain three thousand."},
27]
28
29prompt = tokenizer.apply_chat_template(
30 messages, tokenize=False, add_generation_prompt=True
31)
32output = pipe(prompt, max_new_tokens=100, temperature=0.1, do_sample=True, return_full_text=False)
33print(output[0]["generated_text"])
34# Expected: "Left heading Two Four Zero, descend and maintain Three Thousand. Ultra One Two Three."1@misc{atc-llama-lora-2026,
2 author = {Awoyera, Oluwafemi O. and Brunswicker, Sabine},
3 title = {ATC-LLAMA-LORA: ICAO-Compliant Pilot Response Generation via LoRA Fine-Tuning},
4 year = {2026},
5 publisher = {HuggingFace},
6 url = {https://huggingface.co/Sabine-Brunswicker/ATC-LLAMA-LORA}
7}