Downloads · 30 days
6
8% of all-time downloads
AliUlu/qwen2.5-14b-flydeviation-lora
qwen2.5-14b-flydeviation-lora is a text generation model from AliUlu. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as mit.
LoRA adapter for Qwen/Qwen2.5-14B-Instruct, fine-tuned to predict commercial flight block-time deviations and produce a short Turkish analysis with structured JSON output.
Downloads · 30 days
6
8% of all-time downloads
All-time downloads
75
Public
Repo size
287 MB
Likes
1
Public
Click a slice to open those files.
.safetensors275 MB · 95%
From the Hugging Face model README
LoRA adapter for Qwen/Qwen2.5-14B-Instruct, fine-tuned to predict commercial flight block-time deviations and produce a short Turkish analysis with structured JSON output.

FlyDeviation Lab projesi için eğitilmiş bir LoRA adapter'dır. Qwen2.5-14B-Instruct üzerine QLoRA (NF4 + BF16) ile, EuroControl,ADS-B,FR24 verileri üzerinden elde edilmiş 17 milyon uçuş verisi kullanılarak inşa edilmiş 50.000 örneklik dengeli bir korpus ile fine-tune edildi.
Verilen bir uçuş için:
weather · traffic · airline_ops · nominal · notam)üretir.
Bu adapter tek başına çalışmaz — Qwen/Qwen2.5-14B-Instruct base model'i ile birlikte yüklenmelidir.
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
ADAPTER = "AliUlu/qwen2.5-14b-flydeviation-lora"
BASE = "Qwen/Qwen2.5-14B-Instruct"
# --- (A) ≥30 GB VRAM: BF16 tam yükleme ---
# base = AutoModelForCausalLM.from_pretrained(
# BASE, device_map="auto", torch_dtype=torch.bfloat16,
# )
# --- (B) ~10-14 GB VRAM: 4-bit ---
bnb = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_use_double_quant=True,
)
base = AutoModelForCausalLM.from_pretrained(
BASE, quantization_config=bnb, device_map="auto", torch_dtype=torch.bfloat16,
)
tok = AutoTokenizer.from_pretrained(ADAPTER, use_fast=True)
model = PeftModel.from_pretrained(base, ADAPTER).eval()
# Model, eğitim sırasında bu Türkçe formatla beslendi — drift'i önlemek için
# çıkarımda da aynı formatı kullanılmalı. Live (anlık) bölümü opsiyoneldir;
system = (
"Sen bir uçuş operasyonu analistisin. Verilen rota, uçak tipi, tarih ve "
"operasyonel bağlam bilgilerine göre bu uçuşun tarihsel medyana göre "
"blok-süre sapmasını (deviation_min) tahmin edersin. Eğer prompt'ta "
"'Anlık koşullar' bölümü varsa, METAR'daki rüzgar/yağış, anlık hava "
"trafiği ve aktif NOTAM'larda yer alan kapalı pist/taxiway/yardım "
"kısıtlamalarını analizine ve drivers listesine mutlaka yansıt. Cevabın "
"iki kısımdan oluşur: (1) Türkçe kısa bir analiz paragrafı, (2) JSON "
"bloğu. JSON tam olarak şu anahtarları içermelidir: predicted_min, "
"baseline_min, deviation_min, confidence, drivers (string listesi). "
"Tahminler dakika cinsindendir."
)
user = """Uçuş bilgileri:
- Rota: Madrid (LEMD) → İstanbul (LTFM)
- Tarih: 2026-05-13 (Çarşamba)
- Mevsim: spring
- Kalkış saati: 11:00 (morning)
- Uçak tipi: A321 (sınıf narrow_body)
- Great-circle mesafe: 2701 km, başlangıç yönü 73° (doğu)
- A321 tipik cruise hızı: 833 km/h; bu mesafe için teorik minimum blok süre ≈ 219 dk
Rota tarihçesi (aynı uçak tipi için):
- Örneklem: 112 uçuş
- Medyan blok süre: 210 dk (p10 190 – p90 208, std 6.4)
Operasyonel bağlam:
- Kalkış havalimanında aynı saat dilimindeki kalkış sayısı: 18
- Varış havalimanında aynı saat dilimindeki iniş sayısı: 47
- O gün kalkış havalimanı toplam kalkış: 412, varış havalimanı toplam iniş: 1180
Hava (uçuş zamanı):
- LEMD (kalkış): rüzgar 240°/14kt, sıcaklık 12°C, QNH 1013
- LTFM (iniş): rüzgar 040°/10kt, sıcaklık 19°C, QNH 1016
Anlık koşullar (gerçek zamanlı):
- LEMD METAR: 24014KT 7000 -RA FEW045CB BKN050 12/08 Q1013 RERA NOSIG
- LTFM METAR: 04010KT 9999 SCT030 BKN090 19/12 Q1016 NOSIG RMK RWY17L 03008KT
- LEMD 50km içinde anlık 18 uçak havada
- LTFM 50km içinde anlık 2 uçak havada
- Aktif NOTAM'lar (rota üstü):
- LEMD A3282/26: RAPID EXIT TWY Z10 INDICATOR LIGHTS (RETIL) U/S
- LEMD E2352/26: DME BRA CH111Y ON RDL349 DISTANCE MEASUREMENT NOT RELIABLE BTN 6.8NM AND 4NM
- LEMD A3151/26: REF AIRAC SUP 133/25 PHASE 4 ACT
Görev: Bu uçuşun tarihsel medyana göre blok-süre sapmasını (dakika) tahmin et."""
msgs = [{"role": "system", "content": system}, {"role": "user", "content": user}]
prompt = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
inp = tok(prompt, return_tensors="pt").to(model.device)
with torch.inference_mode():
out = model.generate(**inp, max_new_tokens=512, do_sample=False,
pad_token_id=tok.eos_token_id)
print(tok.decode(out[0, inp.input_ids.shape[1]:], skip_special_tokens=True))
⚠️ Train/serve format uyumu önemli. Eğitim prompt'ları yukarıdaki Türkçe yapıyı kullanıyor. Farklı bir şablonla (örn. İngilizce key-value) sorarsan model performansı düşer.
| Step | eval_loss |
|---|---|
| 2250 (epoch 0.72) | 0.0757 |
| 2500 (epoch 0.80) | 0.0741 |
| 2750 (epoch 0.88) | 0.0731 |
| 3000 (epoch 0.96) | 0.0726 |
Train loss (final): ~0.072 → train ≈ eval, overfit gözlenmedi.
MIT. Base model Qwen/Qwen2.5-14B-Instruct Apache-2.0 ile dağıtılmaktadır; bu adapter'ı kullanırken her iki lisansa da uyulmalıdır.
A LoRA adapter trained for the FlyDeviation Lab project. Fine-tuned on top of Qwen2.5-14B-Instruct using QLoRA (NF4 + BF16) on a 50,000-example balanced corpus distilled from 17 million flights collected via EuroControl, ADS-B, and FR24.
For a given flight, the adapter produces:
weather · traffic · airline_ops · nominal · notam)This adapter does not stand alone — it must be loaded together with the Qwen/Qwen2.5-14B-Instruct base model.
See the Python snippet in the Turkish section above — same code, same prompt structure. The model was trained on Turkish-formatted prompts matching the structure shown there. Using a different schema (e.g. English key-value) will degrade quality due to train/serve drift.
| Step | eval_loss |
|---|---|
| 2250 (epoch 0.72) | 0.0757 |
| 2500 (epoch 0.80) | 0.0741 |
| 2750 (epoch 0.88) | 0.0731 |
| 3000 (epoch 0.96) | 0.0726 |
Train ≈ eval throughout — no overfitting observed.
MIT. The base model Qwen/Qwen2.5-14B-Instruct is distributed under Apache-2.0; both licenses must be respected when using this adapter.