CoolFace
Modelpublic

AdityaNarayan/GLM-4.6-HS-LoRA-CurriculumLearning

sourceHugging Faceapache-2.0updated 9mo agoView on Hugging Face
0likes9downloads
Model Card

GLM-4.6-HS-LoRA-CurriculumLearning

A LoRA fine-tuned version of GLM-4.6 (356B MoE) trained on the Hyperswitch codebase using Phased Curriculum Learning.

Model Description

This model is specifically trained to understand and assist with the Hyperswitch payment orchestration codebase. It was trained using a 3-phase curriculum learning approach on multi-node H200 GPUs with PyTorch FSDP.

Key Features

  • โ€”๐ŸŽฏ Domain-Specific: Trained exclusively on Hyperswitch Rust codebase
  • โ€”๐Ÿ“š Curriculum Learning: 3-phase progressive training (Foundation โ†’ Evolution โ†’ PR Mastery)

Training Details

Hardware Configuration

ComponentSpecification
GPUs16ร— NVIDIA H200 (144GB each)
Nodes2 nodes ร— 8 GPUs
Distributed StrategyPyTorch FSDP (Full Shard)
PrecisionBF16 Mixed Precision

LoRA Configuration

ParameterValue
LoRA Rank (r)64
LoRA Alpha128
LoRA Dropout0.05
Target Modulesqproj, kproj, vproj, oproj
Trainable Parameters736 tensors

Training Hyperparameters

ParameterValue
Effective Batch Size32 (1 ร— 2 grad_accum ร— 16 GPUs)
Sequence Length16,384 tokens
Chunk Overlap2,048 tokens
LR SchedulerCosine
Weight Decay0.01
Max Grad Norm1.0
PrecisionBF16

Curriculum Learning Phases

The model was trained using a 3-phase curriculum learning approach, where each phase builds upon the previous:

Phase 1: Foundation (2 epochs)

MetricValue
DatasetCodebase structure and file patterns
Samples9,293 train / 512 eval
Learning Rate2.5e-5
Warmup Ratio0.15
Training Time32.3 hours
Final Eval Loss0.349
Final Eval Accuracy90.6%

Phase 2: Evolution (2 epochs)

MetricValue
DatasetCommit patterns and code changes
Samples16,622 train / 1,545 eval
Learning Rate2.0e-5
Warmup Ratio0.10
Training Time64.5 hours
Final Eval Loss2.46
Final Eval Accuracy42.3%

Note: Higher loss in Phase 2 is expected due to the complexity of diff/commit patterns.

Phase 3: PR Mastery (1 epoch)

MetricValue
DatasetPull request and review patterns
Samples9,797 train / 509 eval
Learning Rate1.5e-5
Warmup Ratio0.05
Training Time17.8 hours
Final Eval Loss0.472
Final Eval Accuracy90.8%

Training Summary

MetricValue
Total Training Time116.5 hours
Total Steps1,926
Total Epochs5 (2 + 2 + 1)
Initial Train Loss0.609
Final Train Loss0.465
Final Perplexity1.60

Citation

If you use this model, please cite:

bibtex
@misc{glm46-hs-lora-curriculum,
  title = {GLM-4.6-HS-LoRA-CurriculumLearning},
  author = {Aditya Narayan},
  year = {2025},
  publisher = {Hugging Face},
  url = {https://huggingface.co/AdityaNarayan/GLM-4.6-HS-LoRA-CurriculumLearning}
}

Acknowledgments

  • โ€”Base model: GLM-4.6 by Zhipu AI
  • โ€”Training framework: PyTorch FSDP + PEFT
  • โ€”Dataset: Hyperswitch open-source repository by Juspay