model-integration

Integrate model architectures into the Relax training framework with Megatron and FSDP backends.

1|Updated Jun 3, 2026
One-click install
npx skills add https://github.com/EnkeZ/tgsopd --skill model-integration-enkez
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model-integration
Source: https://github.com/EnkeZ/tgsopd/tree/main/skills/model-integration
Command: npx skills add https://github.com/EnkeZ/tgsopd --skill model-integration-enkez

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python, megatron-lm, sglang, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill unit provides comprehensive guidance for integrating new models into the Relax training pipeline, addressing challenges like custom weight conversion, debugging weight sync issues, and adapting models for different training modes.

Core Features & Use Cases

  • Model Integration Guide: Step-by-step instructions for integrating various model architectures and backends into Relax.
  • Megatron and FSDP Support: Detailed guidance on adapting models for Megatron and FSDP backends.
  • Custom Weight Conversion: Walkthroughs for implementing custom weight conversion logic.
  • Quick Start: Example command to integrate a model into Relax using Bridge mode.

Quick Start

Run the following command to integrate a model into Relax using the Bridge mode:

python3 scripts/training/<category>/run-<model>-<size>-<gpus>gpu.sh

Frequently Asked Questions about model-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate a custom model architecture into the Relax training pipeline?

To integrate a custom model architecture into the Relax training pipeline, you need to follow step-by-step guidance for adapting your model and implementing custom weight conversion logic for your chosen backend.

How do I implement custom weight conversion when adapting models for Megatron?

Implementing custom weight conversion for Megatron involves adapting your model's specific weight format to match the Relax framework's requirements, ensuring proper synchronization and debugging any weight sync issues that arise.

What is the difference between adapting models for Megatron and FSDP backends?

Adapting models for Megatron and FSDP backends requires specific configuration adjustments for each parallelism strategy, with the Relax framework providing detailed guidance to handle their distinct training modes and weight distribution mechanisms.

Do I need Megatron-LM and SGLang installed to execute model integration?

Yes, you need Python, Megatron-LM, and SGLang installed in your environment to execute model integration into the Relax framework and run the provided quick start Bridge mode scripts.

Why does weight sync fail during model integration with FSDP?

Weight sync failures during FSDP model integration typically occur due to incorrect custom weight conversion logic, requiring careful debugging of the weight adaptation process to ensure proper synchronization across the distributed training setup.

What is the quick start command to run a model integration in Relax Bridge mode?

The quick start command to run a model integration in Relax Bridge mode is executing `python3 scripts/training/<category>/run-<model>-<size>-<gpus>gpu.sh` to launch the training script.