YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

Introduction

FlagOS is a unified heterogeneous computing software stack for large models, co-developed with leading global chip manufacturers. With core technologies such as the FlagScale distributed training/inference framework, FlagGems universal operator library, FlagCX communication library, and FlagTree unified compiler, the FlagRelease platform leverages the FlagOS stack to automatically produce and release various combinations of <chip + open-source model>. This enables efficient and automated model migration across diverse chips, opening a new chapter for large model deployment and application.

Based on this, the Qwen3-4B-FlagOS-Metax model is adapted for the Metax chip using the FlagOS software stack, enabling:

Integrated Deployment

  • Deep integration with the open-source FlagScale framework
  • Out-of-the-box inference scripts with pre-configured hardware and software parameters
  • Released FlagOS-C550 container image supporting deployment within minutes

Consistency Validation

  • Rigorously evaluated through benchmark testing: Performance and results from the FlagOS software stack are compared against native stacks on multiple public.

Technical Overview

FlagScale Distributed Training and Inference Framework

FlagScale is an end-to-end framework for large models across heterogeneous computing resources, maximizing computational efficiency and ensuring model validity through core technologies. Its key advantages include:

  • Unified Deployment Interface: Standardized command-line tools support one-click service deployment across multiple hardware platforms, significantly reducing adaptation costs in heterogeneous environments.
  • Intelligent Parallel Optimization: Automatically generates optimal distributed parallel strategies based on chip computing characteristics, achieving dynamic load balancing of computation/communication resources.
  • Seamless Operator Switching: Deep integration with the FlagGems operator library allows high-performance operators to be invoked via environment variables without modifying model code.

FlagGems Universal Large-Model Operator Library

FlagGems is a Triton-based, cross-architecture operator library collaboratively developed with industry partners. Its core strengths include:

  • Full-stack Coverage: Over 100 operators, with a broader range of operator types than competing libraries.
  • Ecosystem Compatibility: Supports 7 accelerator backends. Ongoing optimizations have significantly improved performance.
  • High Efficiency: Employs unique code generation and runtime optimization techniques for faster secondary development and better runtime performance compared to alternatives.

FlagEval Evaluation Framework

FlagEval (Libra)** is a comprehensive evaluation system and open platform for large models launched in 2023. It aims to establish scientific, fair, and open benchmarks, methodologies, and tools to help researchers assess model and training algorithm performance. It features:

  • Multi-dimensional Evaluation: Supports 800+ model evaluations across NLP, CV, Audio, and Multimodal fields, covering 20+ downstream tasks including language understanding and image-text generation.
  • Industry-Grade Use Cases: Has completed horizontal evaluations of mainstream large models, providing authoritative benchmarks for chip-model performance validation.

Evaluation Results

Benchmark Result

Metrics Qwen3-4B-H100-CUDA Qwen3-4B-FlagOS-Metax
LIVEBENCH 0.501 0.511
AIME 0.700 0.767
GPQA 0.410 0.435
MMLU 0.669 0.671
MUSR 0.590 0.614

User Guide

Basic Information

model weights https://www.modelscope.cn/models/Qwen/Qwen3-4B
Basic Image flagrelease-registry.cn-beijing.cr.aliyuncs.com/flagrelease/flagrelease:flagrelease_metax_qwen3

Environment Setup

Accelerator Card Driver Version Kernel Mode Driver Version: 2.3.0
Docker Version Docker version 28.0.4, build b8034c0
Operating System Description: Ubuntu 22.04.4 LTS
FlagScale Version: 0.6.0
FlagGems Version: 2.2

Operation Steps

Download Open-source Model Weights

pip install modelscope
modelscope download --model Qwen/Qwen3-4B --local_dir /ufs/Qwen3-4B

Download FlagOS Image

docker pull flagrelease-registry.cn-beijing.cr.aliyuncs.com/flagrelease/flagrelease:flagrelease_metax_qwen3

Start the inference service

#Container Startup
docker run -it --device=/dev/dri --device=/dev/mxcd --group-add video \
    --name flagos --device=/dev/mem --network=host \
    --security-opt seccomp=unconfined --security-opt apparmor=unconfined \
    --shm-size '100gb' --ulimit memlock=-1 \
    -v /usr/local/:/usr/local/ -v /nfs:/nfs \
    flagrelease-registry.cn-beijing.cr.aliyuncs.com/flagrelease/flagrelease:flagrelease_metax_qwen3 /bin/bash

#Service Initialization
flagscale serve qwen3

Service Invocation

API-based Invocation Script

import openai
openai.api_key = "EMPTY"
openai.base_url = "http://<server_ip>:9010/v1/"
model = "Qwen3-4B-metax-flagos"
messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "What's the weather like today?"}
]
response = openai.chat.completions.create(
    model=model,
    messages=messages,
    temperature=0.7,
    top_p=0.95,
    stream=False,
)
for item in response:
    print(item)

AnythingLLM Integration Guide

1. Download & Install

  • Visit the official site: https://anythingllm.com/
  • Choose the appropriate version for your OS (Windows/macOS/Linux)
  • Follow the installation wizard to complete the setup

2. Configuration

  • Launch AnythingLLM
  • Open settings (bottom left, fourth tab)
  • Configure core LLM parameters
  • Click "Save Settings" to apply changes

3. Model Interaction

  • After model loading is complete:
    • Click "New Conversation"
    • Enter your question (e.g., “Explain the basics of quantum computing”)
    • Click the send button to get a response

Contributing

We warmly welcome global developers to join us:

  1. Submit Issues to report problems
  2. Create Pull Requests to contribute code
  3. Improve technical documentation
  4. Expand hardware adaptation support

License

This project and related model weights are licensed under the MIT License.

Release Date: 2025.06.27

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support