yajunvicky commited on
Commit
2208a17
·
verified ·
1 Parent(s): 3a31adc

Initial model upload

Browse files
Files changed (4) hide show
  1. README.md +115 -0
  2. README.md.bak +115 -0
  3. configuration.json +4 -0
  4. image/group.png +0 -0
README.md ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Introduction
2
+
3
+ DeepSeek-R1-FlagOS-metax provides an all-in-one deployment solution, enabling execution of DeepSeek-R1 on metax GPUs. As the first-generation release for the metax-C550, this package delivers three key features:
4
+
5
+ 1. Comprehensive Integration:
6
+ - Integrated with FlagScale (https://github.com/FlagOpen/FlagScale).
7
+ - Open-source inference execution code, preconfigured with all necessary software and hardware settings.
8
+ - Pre-built Docker image for rapid deployment on metax-C550.
9
+ 3. Consistency Validation:
10
+ - Evaluation tests verifying consistency of results between the official and ours.
11
+
12
+ # Technical Summary
13
+
14
+ ## Serving Engine
15
+
16
+ We use FlagScale as the serving engine to improve the portability of distributed inference.
17
+
18
+ FlagScale is an end-to-end framework for large models across multiple chips, maximizing computational resource efficiency while ensuring model effectiveness. It ensures both ease of use and high performance for users when deploying models across different chip architectures:
19
+
20
+ - One-Click Service Deployment: FlagScale provides a unified and simple command execution mechanism, allowing users to fast deploy services seamlessly across various hardware platforms using the same command. This significantly reduces the entry barrier and enhances user experience.
21
+ - Automated Deployment Optimization: FlagScale automatically optimizes distributed parallel strategies based on the computational capabilities of different AI chips, ensuring optimal resource allocation and efficient utilization, thereby improving overall deployment performance.
22
+ - Automatic Operator Library Switching: Leveraging FlagScale's unified Runner mechanism and deep integration with FlagGems, users can seamlessly switch to the FlagGems operator library for inference by simply adding environment variables in the configuration file.
23
+
24
+ ## Triton Support
25
+
26
+ We validate the execution of DeepSeek-R1 model with a Triton-based operator library as a PyTorch alternative.
27
+
28
+ We use a variety of Triton-implemented operation kernels to run the DeepSeek-R1 model. These kernels come from two main sources:
29
+
30
+ - Most Triton kernels are provided by FlagGems (https://github.com/FlagOpen/FlagGems). You can enable FlagGems kernels by setting the environment variable USE_FLAGGEMS.
31
+
32
+ - Also included are Triton kernels from vLLM, such as fused MoE.
33
+
34
+ # Container Image Download
35
+
36
+ | | Usage | metax |
37
+ | ----------- | ------------------------------------------------------------ | ------------------- |
38
+ | Basic Image | basic software environment that supports FlagOS model running | <IMAGE_OF_VENDOR> |
39
+ # Evaluation Results
40
+
41
+ ## Benchmark Result
42
+
43
+ | Metrics | DeepSeek-R1-H100-CUDA | DeepSeek-R1-FlagOS-metax |
44
+ |-------------------|--------------------------|-----------------------------|
45
+ | cmmmu | 49.110 | 42.890 |
46
+ | mmmu | 57.440 | 47.560 |
47
+ | mmmu_pro_standard | 38.400 | 30.210 |
48
+ | mmmu_pro_vision | 41.620 | 36.020 |
49
+ | mm_vet_v2 | 71.122 | 49.434 |
50
+ | mathvision | 33.630 | 18.710 |
51
+ | cii_bench | 55.160 | 40.170 |
52
+ | blink | 57.550 | 51.630 |
53
+
54
+
55
+ # How to Run Locally
56
+ ## 📌 Getting Started
57
+ ### Download open-source weights
58
+
59
+ ```bash
60
+
61
+ pip install modelscope
62
+ modelscope download --model <Model Name> --local_dir <Cache Path>
63
+
64
+ ```
65
+
66
+ ### Download the FlagOS image
67
+
68
+ ```bash
69
+ docker pull <IMAGE>
70
+ ```
71
+
72
+ ### Start the inference service
73
+
74
+ ```bash
75
+ docker run --rm --init --detach \
76
+ --net=host --uts=host --ipc=host \
77
+ --security-opt=seccomp=unconfined \
78
+ --privileged=true \
79
+ --ulimit stack=67108864 \
80
+ --ulimit memlock=-1 \
81
+ --ulimit nofile=1048576:1048576 \
82
+ --shm-size=32G \
83
+ -v /share:/share \
84
+ --gpus all \
85
+ --name flagos \
86
+ <IMAGE> \
87
+ sleep infinity
88
+
89
+ docker exec -it flagos bash
90
+ ```
91
+
92
+ ### Serve
93
+
94
+ ```bash
95
+ flagscale serve <Model>
96
+ ```
97
+
98
+ # Contributing
99
+
100
+ We warmly welcome global developers to join us:
101
+ 1. Submit Issues to report problems
102
+ 2. Create Pull Requests to contribute code
103
+ 3. Improve technical documentation
104
+ 4. Expand hardware adaptation support
105
+
106
+ # 📞 Contact Us
107
+
108
+ Scan the QR code below to add our WeChat group
109
+ send "FlagRelease"
110
+
111
+ ![WeChat](image/group.png)
112
+
113
+ # License
114
+
115
+ This project and related model weights are licensed under the MIT License.
README.md.bak ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Introduction
2
+
3
+ DeepSeek-R1-FlagOS-metax provides an all-in-one deployment solution, enabling execution of DeepSeek-R1 on metax GPUs. As the first-generation release for the metax-C550, this package delivers three key features:
4
+
5
+ 1. Comprehensive Integration:
6
+ - Integrated with FlagScale (https://github.com/FlagOpen/FlagScale).
7
+ - Open-source inference execution code, preconfigured with all necessary software and hardware settings.
8
+ - Pre-built Docker image for rapid deployment on metax-C550.
9
+ 3. Consistency Validation:
10
+ - Evaluation tests verifying consistency of results between the official and ours.
11
+
12
+ # Technical Summary
13
+
14
+ ## Serving Engine
15
+
16
+ We use FlagScale as the serving engine to improve the portability of distributed inference.
17
+
18
+ FlagScale is an end-to-end framework for large models across multiple chips, maximizing computational resource efficiency while ensuring model effectiveness. It ensures both ease of use and high performance for users when deploying models across different chip architectures:
19
+
20
+ - One-Click Service Deployment: FlagScale provides a unified and simple command execution mechanism, allowing users to fast deploy services seamlessly across various hardware platforms using the same command. This significantly reduces the entry barrier and enhances user experience.
21
+ - Automated Deployment Optimization: FlagScale automatically optimizes distributed parallel strategies based on the computational capabilities of different AI chips, ensuring optimal resource allocation and efficient utilization, thereby improving overall deployment performance.
22
+ - Automatic Operator Library Switching: Leveraging FlagScale's unified Runner mechanism and deep integration with FlagGems, users can seamlessly switch to the FlagGems operator library for inference by simply adding environment variables in the configuration file.
23
+
24
+ ## Triton Support
25
+
26
+ We validate the execution of DeepSeek-R1 model with a Triton-based operator library as a PyTorch alternative.
27
+
28
+ We use a variety of Triton-implemented operation kernels to run the DeepSeek-R1 model. These kernels come from two main sources:
29
+
30
+ - Most Triton kernels are provided by FlagGems (https://github.com/FlagOpen/FlagGems). You can enable FlagGems kernels by setting the environment variable USE_FLAGGEMS.
31
+
32
+ - Also included are Triton kernels from vLLM, such as fused MoE.
33
+
34
+ # Container Image Download
35
+
36
+ | | Usage | metax |
37
+ | ----------- | ------------------------------------------------------------ | ------------------- |
38
+ | Basic Image | basic software environment that supports FlagOS model running | <IMAGE> |
39
+ # Evaluation Results
40
+
41
+ ## Benchmark Result
42
+
43
+ | Metrics | DeepSeek-R1-H100-CUDA | DeepSeek-R1-FlagOS-metax |
44
+ |-------------------|--------------------------|-----------------------------|
45
+ | cmmmu | 49.11 | 42.89 |
46
+ | mmmu | 57.44 | 47.56 |
47
+ | mmmu_pro_standard | 38.4 | 30.21 |
48
+ | mmmu_pro_vision | 41.62 | 36.02 |
49
+ | mm_vet_v2 | 71.122 | 49.434 |
50
+ | mathvision | 33.63 | 18.71 |
51
+ | cii_bench | 55.16 | 40.17 |
52
+ | blink | 57.55 | 51.63 |
53
+
54
+
55
+ # How to Run Locally
56
+ ## 📌 Getting Started
57
+ ### Download open-source weights
58
+
59
+ ```bash
60
+
61
+ pip install modelscope
62
+ modelscope download --model <Model Name> --local_dir <Cache Path>
63
+
64
+ ```
65
+
66
+ ### Download the FlagOS image
67
+
68
+ ```bash
69
+ docker pull <IMAGE>
70
+ ```
71
+
72
+ ### Start the inference service
73
+
74
+ ```bash
75
+ docker run --rm --init --detach \
76
+ --net=host --uts=host --ipc=host \
77
+ --security-opt=seccomp=unconfined \
78
+ --privileged=true \
79
+ --ulimit stack=67108864 \
80
+ --ulimit memlock=-1 \
81
+ --ulimit nofile=1048576:1048576 \
82
+ --shm-size=32G \
83
+ -v /share:/share \
84
+ --gpus all \
85
+ --name flagos \
86
+ <IMAGE> \
87
+ sleep infinity
88
+
89
+ docker exec -it flagos bash
90
+ ```
91
+
92
+ ### Serve
93
+
94
+ ```bash
95
+ flagscale serve <Model>
96
+ ```
97
+
98
+ # Contributing
99
+
100
+ We warmly welcome global developers to join us:
101
+ 1. Submit Issues to report problems
102
+ 2. Create Pull Requests to contribute code
103
+ 3. Improve technical documentation
104
+ 4. Expand hardware adaptation support
105
+
106
+ # 📞 Contact Us
107
+
108
+ Scan the QR code below to add our WeChat group
109
+ send "FlagRelease"
110
+
111
+ ![WeChat](image/group.png)
112
+
113
+ # License
114
+
115
+ This project and related model weights are licensed under the MIT License.
configuration.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "framework": "pytorch",
3
+ "task": ""
4
+ }
image/group.png ADDED