hletrd commited on
Commit
2caa5f1
·
verified ·
1 Parent(s): 96d3007

Card: shorter text in our sections

Browse files
Files changed (1) hide show
  1. README.md +7 -13
README.md CHANGED
@@ -31,17 +31,13 @@ tags:
31
 
32
  </div>
33
 
34
- The text model of [tencent/Hy4](https://huggingface.co/tencent/Hy4) (770B parameters, 49B active) converted for [MLX](https://github.com/ml-explore/mlx), with the routed experts in 4-bit. It loads in `mlx-lm` through the model file `hy_v4.py` in this repository.
35
-
36
- - **Files:** the text weights (447.58 GB in 243 shards), `hy_v4.py` and the conversion script.
37
- - **Not included:** the vision tower and the DFly2 drafter. Text in, text out.
38
- - **Run it:** see [How to run](#how-to-run).
39
 
40
  ## Files
41
 
42
  | File | What it is |
43
  |---|---|
44
- | `model-NNNNN-of-00245.safetensors` | the text weights, 447.58 GB (416.84 GiB) in 243 files; each is named after the `tencent/Hy4` shard it was converted from (shards 89 and 245 hold only the vision tower and the drafter, so they have no counterpart) |
45
  | `model.safetensors.index.json` | which file holds each tensor |
46
  | `hy_v4.py` | the Hy4 text model for `mlx-lm`, named by `model_file` in `config.json` |
47
  | `convert_hy4.py` | the script that made these files from the BF16 original |
@@ -50,6 +46,8 @@ The text model of [tencent/Hy4](https://huggingface.co/tencent/Hy4) (770B parame
50
  | `ORIGINS.md`, `LICENSE.transformers` | where the code in `hy_v4.py` comes from, and the Apache-2.0 license of the Transformers code it ports |
51
  | `LICENSE`, `NOTICE` | the Tencent Hy License, Version 1.0, and the notice |
52
 
 
 
53
  ## Tensor recipe
54
 
55
  | Tensor class | Format |
@@ -73,20 +71,16 @@ mlx_lm.server --model Xylolabs/Hy4-MLX-4bit --trust-remote-code
73
 
74
  ## How this was made
75
 
76
- 1. Stream `tencent/Hy4` (BF16, revision `c10c0de5`) shard by shard with `convert_hy4.py`: download a shard, quantize its text tensors with `mx.quantize` (affine, group size 64, round to nearest), write them, delete the shard. Routed experts go to 4-bit; attention, the indexer's query and key projections, the shared experts and the dense layer go to 8-bit; the rest is copied. Each attention `kv_b_proj` is split into per-head `embed_q` and `unembed_out`, as in `mlx-lm`'s DeepSeek-V3.2 model.
77
  2. `hy_v4.py` ports Transformers' `hy_v4` model. RoPE rotates adjacent pairs, as Transformers' `hy_v4_vl` class and its pull request 50589 do.
78
 
79
  ## License and notices
80
 
81
- - **License:** Tencent Hy License, Version 1.0, copied in `LICENSE`. Its terms apply to these files, including the extra terms for large Model-as-a-Service operators.
82
- - **What we changed:** we quantized the weights and converted them to MLX with `convert_hy4.py`; `hy_v4.py` is the model code.
83
- - **Code:** `hy_v4.py` contains code ported from Hugging Face Transformers (Apache-2.0, `LICENSE.transformers`) and from `mlx-lm` (MIT, notice in `ORIGINS.md`).
84
- - **Notices:** `NOTICE` names the source model and its copyright holder.
85
- - Xylolabs is not affiliated with or endorsed by Tencent.
86
 
87
  ## Tencent's original model description
88
 
89
- The text below is the README of [tencent/Hy4](https://huggingface.co/tencent/Hy4) without its metadata header, copyright Tencent, under the Tencent Hy License (see above). It describes Tencent's original model, not these files, and its usage instructions (vLLM, SGLang) are for Tencent's checkpoints; for these MLX files use "How to run" above. Changes by Xylolabs: heading levels are one level deeper, and image paths point to Tencent's repository instead of copies; the wording is unchanged. Tencent's own README is the authoritative version.
90
 
91
  <p align="left">
92
  <a href="https://huggingface.co/tencent/Hy4/blob/main/README_CN.md">中文</a>&nbsp;|&nbsp;English
 
31
 
32
  </div>
33
 
34
+ The text model of [tencent/Hy4](https://huggingface.co/tencent/Hy4) (770B parameters, 49B active) converted for [MLX](https://github.com/ml-explore/mlx), with the routed experts in 4-bit; the vision tower and the DFly2 drafter are not included, so it takes text and returns text.
 
 
 
 
35
 
36
  ## Files
37
 
38
  | File | What it is |
39
  |---|---|
40
+ | `model-NNNNN-of-00245.safetensors` | the text weights, 447.58 GB (416.84 GiB) in 243 files |
41
  | `model.safetensors.index.json` | which file holds each tensor |
42
  | `hy_v4.py` | the Hy4 text model for `mlx-lm`, named by `model_file` in `config.json` |
43
  | `convert_hy4.py` | the script that made these files from the BF16 original |
 
46
  | `ORIGINS.md`, `LICENSE.transformers` | where the code in `hy_v4.py` comes from, and the Apache-2.0 license of the Transformers code it ports |
47
  | `LICENSE`, `NOTICE` | the Tencent Hy License, Version 1.0, and the notice |
48
 
49
+ Each weight file is named after the `tencent/Hy4` shard it was converted from; shards 89 and 245 hold only the vision tower and the drafter, so they have no counterpart.
50
+
51
  ## Tensor recipe
52
 
53
  | Tensor class | Format |
 
71
 
72
  ## How this was made
73
 
74
+ 1. Stream `tencent/Hy4` (BF16, revision `c10c0de5`) shard by shard with `convert_hy4.py`: download a shard, quantize its text tensors with `mx.quantize` (affine, group size 64, round to nearest) as the tensor recipe lists and copy the rest, write them, delete the shard. Each attention `kv_b_proj` is split into per-head `embed_q` and `unembed_out`, as in `mlx-lm`'s DeepSeek-V3.2 model.
75
  2. `hy_v4.py` ports Transformers' `hy_v4` model. RoPE rotates adjacent pairs, as Transformers' `hy_v4_vl` class and its pull request 50589 do.
76
 
77
  ## License and notices
78
 
79
+ These files are under the Tencent Hy License, Version 1.0, copied in `LICENSE`, including its extra terms for large Model-as-a-Service operators. We quantized the weights and converted them to MLX with `convert_hy4.py`. `hy_v4.py` is the model code; it contains code ported from Hugging Face Transformers (Apache-2.0, `LICENSE.transformers`) and from `mlx-lm` (MIT, notice in `ORIGINS.md`). `NOTICE` names the source model and its copyright holder. Xylolabs is not affiliated with or endorsed by Tencent.
 
 
 
 
80
 
81
  ## Tencent's original model description
82
 
83
+ Below is the README of [tencent/Hy4](https://huggingface.co/tencent/Hy4) (copyright Tencent, Tencent Hy License) without its metadata header, unchanged except for heading levels and image paths; it describes the original checkpoints, not these files.
84
 
85
  <p align="left">
86
  <a href="https://huggingface.co/tencent/Hy4/blob/main/README_CN.md">中文</a>&nbsp;|&nbsp;English