Views
No views yet
| File | Purpose |
|---|---|
train.py | QLoRA fine-tuning on your intent dataset (Kaggle T4x2 optimized) |
inference.py | Generate configs from natural language intents (interactive or batch) |
merge_and_push.py | Merge LoRA adapters + push merged model to Hugging Face Hub |
benchmark.py | Evaluate on test set: JSON validity, schema compliance, semantic similarity |
kaggle_notebook.ipynb | Ready-to-run Kaggle notebook (download scripts → train → test → benchmark) |
requirements.txt | Python dependencies |
nraptisss/TMF921-intent-to-config-augmented (~35K, multi-layer)nraptisss/TMF921-intent-to-config-25k (~25K, multi-layer)nraptisss/telecom-intent-config-sft-10k (~10K, multi-layer)messages format with system/user/assistant roles.| Layer | Standard | Output Format |
|---|---|---|
tmf921 | TM Forum Intent Management API v5.0.0 | JSON intent FVO |
intent_3gpp | 3GPP TS 28.312 Rel-18 | JSON intent payload |
camara | CAMARA NetworkSliceBooking | OpenAPI JSON |
etsi_zsm | ETSI ZSM GS 009-1 | JSON service profile |
a1_policy | O-RAN WG2 A1 Interface | JSON policy |
o1_nrm | 3GPP TS 28.541 NR NRM | YANG/XML-style JSON |
kaggle_notebook.ipynb into the first cell1pip install -q transformers trl peft accelerate bitsandbytes datasets sentence-transformers huggingface-hub
2
3wget https://huggingface.co/nraptisss/telecom-intent-pipeline/resolve/main/train.py
4wget https://huggingface.co/nraptisss/telecom-intent-pipeline/resolve/main/inference.py
5wget https://huggingface.co/nraptisss/telecom-intent-pipeline/resolve/main/merge_and_push.py
6wget https://huggingface.co/nraptisss/telecom-intent-pipeline/resolve/main/benchmark.py
7
8python train.py # 2-3 hours on T4x2
9python inference.py --intent "Deploy URLLC slice for factory automation with 1ms latency"
10python benchmark.py --max_samples 100
11python merge_and_push.py # pushes to your hub| Parameter | Value | Rationale |
|---|---|---|
| Model | Qwen2.5-7B-Instruct | Fits 16GB VRAM, strong reasoning |
| Quantization | 4-bit NF4 | QLoRA, enables 7B on T4 |
| LoRA rank | 64 | Balances capacity and memory |
| LoRA alpha | 16 | Standard α = r/4 |
| Batch size | 1 per GPU | Fits T4 VRAM |
| Gradient accumulation | 4 | Effective batch = 4 |
| Learning rate | 2e-4 | 10× base for LoRA (TRL recommendation) |
| Max length | 512 | Covers most intent→config pairs |
| Epochs | 3 | Sufficient for ~35K samples |
| Liger kernel | Disabled | Crashes on T4 with gradient checkpointing |
| FP16 | True | T4 has no bf16 support |
liger-kernel is intentionally disabled by default (use_liger_kernel=False). It causes Triton crashes on T4 GPUs when combined with gradient checkpointing. Only enable it if training on A100 / L40 / H100.TMF921-intent-to-config-augmented:train.py:1DATASET_NAME = "your-username/your-dataset"
2DATASET_CONFIG = "default"
3TRAIN_SPLIT = "train"train.py:MODEL_NAME = "meta-llama/Llama-3.1-8B-Instruct"train.py:1LORA_R = 32 # lower = less memory, less capacity
2LORA_ALPHA = 8
3MAX_LENGTH = 256 # shorter sequencestrain.py and merge_and_push.py:HUB_MODEL_ID = "your-username/your-model-name"train.py:use_liger_kernel=True # ONLY on A100 / L40 / H100. WILL crash on T4.pip install liger-kernel>=0.5.0┌─────────────────┐ ┌──────────────┐ ┌─────────────────┐
│ Natural Lang │────▶│ LoRA LLM │────▶│ JSON Config │
│ Intent │ │ (7B params) │ │ (TMF921/3GPP │
│ "Deploy URLLC │ │ fine-tuned │ │ /CAMARA/etc) │
│ slice..." │ │ on telecom │ │ │
└─────────────────┘ └──────────────┘ └─────────────────┘
│
▼
┌──────────────┐
│ 4-bit NF4 │
│ QLoRA (r=64) │
└──────────────┘| Problem | Fix |
|---|---|
CUDA OOM during training | Lower LORA_R to 32, reduce MAX_LENGTH to 256, or set per_device_train_batch_size=1 |
liger-kernel / Triton crash | Already disabled by default. Do NOT install or enable on T4. |
ValueError: Can't find adapter_config.json | Training didn't finish or save. Check train.py output for errors. |
| JSON parsing errors in inference | Check --temperature (lower = more deterministic), or re-train with more epochs |
| T4 doesn't support bf16 | Already handled: fp16=True, bf16=False in config |
| Slow training | Enable T4x2 (not T4x1) on Kaggle for ~2x speedup |
HFValidationError on local paths | Use absolute paths or ensure adapter directory exists |
liger_kernel Triton operators crash with gradient checkpointing on T4 GPUs. This is a known incompatibility. The fix is disabling liger (use_liger_kernel=False), which is the default.model.gradient_checkpointing_enable() manually when using SFTTrainer. The trainer handles this automatically via gradient_checkpointing=True in SFTConfig. Manual enablement conflicts with PEFT + 4-bit quantization.1@misc{nraptisss2026telecom,
2 title={Telecom Intent-to-Config Pipeline},
3 author={Raptis, Nikos},
4 year={2026},
5 url={https://huggingface.co/nraptisss/telecom-intent-pipeline}
6}