Downloads · 30 days
3
7% of all-time downloads
FlagRelease/phi-4-FlagOS
phi-4-FlagOS is a machine learning model from FlagRelease. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
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,…
Downloads · 30 days
3
7% of all-time downloads
All-time downloads
41
Public
Parameters
14.7B
29.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors29.3 GB · 100%
From the Hugging Face model README
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 phi-4-FlagOS model is adapted for the Nvidia chip using the FlagOS software stack, enabling:
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:
FlagGems is a Triton-based, cross-architecture operator library collaboratively developed with industry partners. Its core strengths include:
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:
| Metrics | phi-4-H100-CUDA | phi-4-FlagOS |
|---|---|---|
| AIME-0shot@avg1 | 0.200 | 0.167 |
| GPQA-0shot@avg1 | 0.241 | 0.230 |
| MMLU-5shots@avg1 | 0.713 | 0.713 |
| MUSR-0shot@avg1 | 0.594 | 0.573 |
| LiveBench-0shot@avg1 | 0.431 | 0.427 |
Environment Setup
| Item | Version |
|---|---|
| Docker Version | Docker version 28.1.0, build 4d8c241 |
| Operating System | Ubuntu 22.04.5 LTS |
| FlagScale | Version: 0.8.0 |
| FlagGems | Version: 3.0 |
docker pull harbor.baai.ac.cn/flagrelease-public/flagrelease-nvidia-release-model_phi-4-tree_none-gems_3.0-scale_0.8.0-cx_none-python_3.12.3-torch_2.7.1-pcp_cuda12.9-gpu_nvidia005-arc_amd64-driver_570.124.06:2508271640
pip install modelscope
modelscope download --model LLM-Research/phi-4 --local_dir /share/models/phi-4
#Container Startup
docker run --rm --init --detach --net=host --uts=host --ipc=host --security-opt=seccomp=unconfined --privileged=true --ulimit stack=67108864 --ulimit memlock=-1 --ulimit nofile=1048576:1048576 --shm-size=32G -v /share:/share --gpus all --name flagos harbor.baai.ac.cn/flagrelease-public/flagrelease-nvidia-release-model_phi-4-tree_none-gems_3.0-scale_0.8.0-cx_none-python_3.12.3-torch_2.7.1-pcp_cuda12.9-gpu_nvidia005-arc_amd64-driver_570.124.06:2508271640 sleep infinity
docker exec -it flagos bash
flagscale serve phi_4
import openai
openai.api_key = "EMPTY"
openai.base_url = "http://<server_ip>:9010/v1/"
model = "phi-4-nvidia-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,
stream=False,
)
for item in response:
print(item)
We warmly welcome global developers to join us:
本模型的权重来源于LLM-Research/phi-4,以apache2.0协议https://www.apache.org/licenses/LICENSE-2.0.txt开源。