erfanzar commited on
Commit
71a5786
·
verified ·
1 Parent(s): e5c501e

Add files using upload-large-folder tool

Browse files
Files changed (50) hide show
  1. README.md +159 -0
  2. model/model/visual/blocks/5/mlp/linear_fc2/bias/0 +0 -0
  3. model/model/visual/blocks/6/norm2/scale/.zarray +1 -0
  4. model/model/visual/blocks/7/attn/qkv/bias/0 +0 -0
  5. model/model/visual/blocks/8/attn/proj/kernel/.zarray +1 -0
  6. model/model/visual/blocks/8/attn/qkv/bias/.zarray +1 -0
  7. model/model/visual/blocks/8/attn/qkv/kernel/.zarray +1 -0
  8. model/model/visual/blocks/8/mlp/linear_fc1/kernel/.zarray +1 -0
  9. model/model/visual/blocks/8/mlp/linear_fc2/bias/0 +0 -0
  10. model/model/visual/blocks/8/mlp/linear_fc2/kernel/.zarray +1 -0
  11. model/model/visual/blocks/8/norm1/bias/0 +0 -0
  12. model/model/visual/blocks/8/norm1/scale/.zarray +1 -0
  13. model/model/visual/blocks/8/norm1/scale/0 +0 -0
  14. model/model/visual/blocks/8/norm2/bias/.zarray +1 -0
  15. model/model/visual/blocks/8/norm2/bias/0 +0 -0
  16. model/model/visual/blocks/8/norm2/scale/.zarray +1 -0
  17. model/model/visual/blocks/8/norm2/scale/0 +0 -0
  18. model/model/visual/blocks/9/attn/proj/bias/.zarray +1 -0
  19. model/model/visual/blocks/9/attn/proj/bias/0 +0 -0
  20. model/model/visual/blocks/9/attn/proj/kernel/.zarray +1 -0
  21. model/model/visual/blocks/9/attn/qkv/bias/.zarray +1 -0
  22. model/model/visual/blocks/9/attn/qkv/bias/0 +0 -0
  23. model/model/visual/blocks/9/mlp/linear_fc1/bias/.zarray +1 -0
  24. model/model/visual/blocks/9/mlp/linear_fc1/bias/0 +0 -0
  25. model/model/visual/blocks/9/mlp/linear_fc1/kernel/.zarray +1 -0
  26. model/model/visual/blocks/9/mlp/linear_fc2/bias/.zarray +1 -0
  27. model/model/visual/blocks/9/mlp/linear_fc2/bias/0 +0 -0
  28. model/model/visual/blocks/9/mlp/linear_fc2/kernel/.zarray +1 -0
  29. model/model/visual/blocks/9/norm1/bias/.zarray +1 -0
  30. model/model/visual/blocks/9/norm1/bias/0 +0 -0
  31. model/model/visual/blocks/9/norm1/scale/.zarray +1 -0
  32. model/model/visual/blocks/9/norm1/scale/0 +0 -0
  33. model/model/visual/blocks/9/norm2/bias/.zarray +1 -0
  34. model/model/visual/blocks/9/norm2/bias/0 +0 -0
  35. model/model/visual/blocks/9/norm2/scale/.zarray +1 -0
  36. model/model/visual/blocks/9/norm2/scale/0 +0 -0
  37. model/model/visual/merger/linear_fc1/bias/.zarray +1 -0
  38. model/model/visual/merger/linear_fc1/bias/0 +0 -0
  39. model/model/visual/merger/linear_fc1/kernel/.zarray +1 -0
  40. model/model/visual/merger/linear_fc2/bias/.zarray +1 -0
  41. model/model/visual/merger/linear_fc2/bias/0 +0 -0
  42. model/model/visual/merger/linear_fc2/kernel/.zarray +1 -0
  43. model/model/visual/merger/norm/bias/.zarray +1 -0
  44. model/model/visual/merger/norm/bias/0 +0 -0
  45. model/model/visual/merger/norm/scale/.zarray +1 -0
  46. model/model/visual/merger/norm/scale/0 +0 -0
  47. model/model/visual/patch_embed/proj/bias/.zarray +1 -0
  48. model/model/visual/patch_embed/proj/bias/0 +0 -0
  49. model/model/visual/patch_embed/proj/kernel/.zarray +1 -0
  50. model/model/visual/pos_embed/embedding/.zarray +1 -0
README.md ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: easydel
3
+ pipeline_tag: image-to-text
4
+ tags:
5
+ - easydel
6
+ - jax
7
+ - "qwen3_5"
8
+ - "ImageTextToText"
9
+ - "vanilla"
10
+ ---
11
+
12
+ <p align="center">
13
+ <img alt="EasyDeL" src="https://raw.githubusercontent.com/erfanzar/easydel/main/images/easydel-logo-with-text.png" height="80">
14
+ </p>
15
+
16
+ <h1 align="center">Qwen/Qwen3.5-2B-Base</h1>
17
+
18
+ <div align="center">
19
+ EasyDeL checkpoint converted from Qwen/Qwen3.5-2B-Base.
20
+ </div>
21
+
22
+ ## Overview
23
+
24
+ This checkpoint is intended to be loaded with EasyDeL on JAX (CPU/GPU/TPU). It supports sharded loading with `auto_shard_model=True` and configurable precision via `dtype`, `param_dtype`, and `precision`.
25
+
26
+ ## Quickstart
27
+
28
+ ```python
29
+ import easydel as ed
30
+ from jax import numpy as jnp, lax
31
+
32
+ repo_id = "/dev/shm/conv/Qwen3.5-2B-Base"
33
+
34
+ dtype = jnp.bfloat16 # try jnp.float16 on many GPUs
35
+
36
+ model = ed.AutoEasyDeLModelForImageTextToText.from_pretrained(
37
+ repo_id,
38
+ dtype=dtype,
39
+ param_dtype=dtype,
40
+ precision=lax.Precision("fastest"),
41
+ sharding_axis_names=("dp", "fsdp", "ep", "tp", "sp"),
42
+ sharding_axis_dims=(1, -1, 1, 1, 1),
43
+ config_kwargs=ed.EasyDeLBaseConfigDict(
44
+ attn_dtype=dtype,
45
+ attn_mechanism=ed.AttentionMechanisms.VANILLA,
46
+ fsdp_is_ep_bound=True,
47
+ sp_is_ep_bound=True,
48
+ moe_method=ed.MoEMethods.FUSED_MOE,
49
+ ),
50
+ auto_shard_model=True,
51
+ partition_axis=ed.PartitionAxis(),
52
+ )
53
+ ```
54
+
55
+ If the repository only provides PyTorch weights, pass `from_torch=True` to `from_pretrained(...)`.
56
+
57
+ ## Sharding & Parallelism (Multi-Device)
58
+
59
+ EasyDeL can scale to multiple devices by creating a logical device mesh. Most EasyDeL loaders use a 5D mesh:
60
+
61
+ - `dp`: data parallel (replicated parameters, different batch shards)
62
+ - `fsdp`: parameter sharding (memory saver; often the biggest axis)
63
+ - `ep`: expert parallel (MoE; keep `1` for non-MoE models)
64
+ - `tp`: tensor parallel (splits large matmuls)
65
+ - `sp`: sequence parallel (splits sequence dimension)
66
+
67
+ Use `sharding_axis_names=("dp","fsdp","ep","tp","sp")` and choose `sharding_axis_dims` so that their product equals your device count.
68
+ You can use `-1` in `sharding_axis_dims` to let EasyDeL infer the remaining dimension.
69
+
70
+ <details>
71
+ <summary>Example sharding configs</summary>
72
+
73
+ ```python
74
+ # 8 devices, pure FSDP
75
+ sharding_axis_dims = (1, 8, 1, 1, 1)
76
+
77
+ # 8 devices, 2-way DP x 4-way FSDP
78
+ sharding_axis_dims = (2, 4, 1, 1, 1)
79
+
80
+ # 8 devices, 4-way FSDP x 2-way TP
81
+ sharding_axis_dims = (1, 4, 1, 2, 1)
82
+ ```
83
+ </details>
84
+
85
+ ## Using via `eLargeModel` (ELM)
86
+
87
+ `eLargeModel` is a higher-level interface that wires together loading, sharding, training, and eSurge inference from a single config.
88
+
89
+ ```python
90
+ from easydel import eLargeModel
91
+
92
+ repo_id = "/dev/shm/conv/Qwen3.5-2B-Base"
93
+
94
+ elm = eLargeModel.from_pretrained(repo_id) # task is auto-detected
95
+ elm.set_dtype("bf16")
96
+ elm.set_sharding(axis_names=("dp", "fsdp", "ep", "tp", "sp"), axis_dims=(1, -1, 1, 1, 1))
97
+
98
+ model = elm.build_model()
99
+ # Optional: build an inference engine
100
+ # engine = elm.build_esurge()
101
+ ```
102
+
103
+ <details>
104
+ <summary>ELM YAML config example</summary>
105
+
106
+ ```yaml
107
+ model:
108
+ name_or_path: "/dev/shm/conv/Qwen3.5-2B-Base"
109
+
110
+ loader:
111
+ dtype: bf16
112
+ param_dtype: bf16
113
+
114
+ sharding:
115
+ axis_dims: [1, -1, 1, 1, 1]
116
+ auto_shard_model: true
117
+ ```
118
+ </details>
119
+
120
+ ## Features
121
+
122
+ **EasyDeL:**
123
+ - JAX native implementation and sharded execution
124
+ - Configurable attention backends via `AttentionMechanisms.*`
125
+ - Precision control via `dtype`, `param_dtype`, and `precision`
126
+
127
+ ## Installation
128
+
129
+ ```bash
130
+ pip install easydel
131
+ ```
132
+
133
+ ## Links
134
+
135
+ - EasyDeL GitHub: https://github.com/erfanzar/EasyDeL
136
+ - Docs: https://easydel.readthedocs.io/en/latest/
137
+
138
+ ## Supported Tasks
139
+
140
+ - ImageTextToText
141
+
142
+ ## Limitations
143
+
144
+ - Refer to the original model card for training data, evaluation, and intended use.
145
+
146
+ ## License
147
+
148
+ EasyDeL is released under the Apache-2.0 license. The license for this model's weights may differ; please consult the original repository.
149
+
150
+ ## Citation
151
+
152
+ ```bibtex
153
+ @misc{Zare Chavoshi_2023,
154
+ title={EasyDeL: An open-source library for enhancing and streamlining the training process of machine learning models},
155
+ url={https://github.com/erfanzar/EasyDeL},
156
+ author={Zare Chavoshi, Erfan},
157
+ year={2023}
158
+ }
159
+ ```
model/model/visual/blocks/5/mlp/linear_fc2/bias/0 ADDED
Binary file (1.68 kB). View file
 
model/model/visual/blocks/6/norm2/scale/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024],"zarr_format":2}
model/model/visual/blocks/7/attn/qkv/bias/0 ADDED
Binary file (5.08 kB). View file
 
model/model/visual/blocks/8/attn/proj/kernel/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[1024,256],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024,1024],"zarr_format":2}
model/model/visual/blocks/8/attn/qkv/bias/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[3072],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[3072],"zarr_format":2}
model/model/visual/blocks/8/attn/qkv/kernel/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[256,3072],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024,3072],"zarr_format":2}
model/model/visual/blocks/8/mlp/linear_fc1/kernel/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[256,4096],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024,4096],"zarr_format":2}
model/model/visual/blocks/8/mlp/linear_fc2/bias/0 ADDED
Binary file (1.68 kB). View file
 
model/model/visual/blocks/8/mlp/linear_fc2/kernel/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[4096,256],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[4096,1024],"zarr_format":2}
model/model/visual/blocks/8/norm1/bias/0 ADDED
Binary file (1.68 kB). View file
 
model/model/visual/blocks/8/norm1/scale/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024],"zarr_format":2}
model/model/visual/blocks/8/norm1/scale/0 ADDED
Binary file (1.31 kB). View file
 
model/model/visual/blocks/8/norm2/bias/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024],"zarr_format":2}
model/model/visual/blocks/8/norm2/bias/0 ADDED
Binary file (1.66 kB). View file
 
model/model/visual/blocks/8/norm2/scale/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024],"zarr_format":2}
model/model/visual/blocks/8/norm2/scale/0 ADDED
Binary file (1.23 kB). View file
 
model/model/visual/blocks/9/attn/proj/bias/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024],"zarr_format":2}
model/model/visual/blocks/9/attn/proj/bias/0 ADDED
Binary file (1.67 kB). View file
 
model/model/visual/blocks/9/attn/proj/kernel/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[1024,256],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024,1024],"zarr_format":2}
model/model/visual/blocks/9/attn/qkv/bias/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[3072],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[3072],"zarr_format":2}
model/model/visual/blocks/9/attn/qkv/bias/0 ADDED
Binary file (5.07 kB). View file
 
model/model/visual/blocks/9/mlp/linear_fc1/bias/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[4096],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[4096],"zarr_format":2}
model/model/visual/blocks/9/mlp/linear_fc1/bias/0 ADDED
Binary file (5.65 kB). View file
 
model/model/visual/blocks/9/mlp/linear_fc1/kernel/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[256,4096],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024,4096],"zarr_format":2}
model/model/visual/blocks/9/mlp/linear_fc2/bias/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024],"zarr_format":2}
model/model/visual/blocks/9/mlp/linear_fc2/bias/0 ADDED
Binary file (1.68 kB). View file
 
model/model/visual/blocks/9/mlp/linear_fc2/kernel/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[4096,256],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[4096,1024],"zarr_format":2}
model/model/visual/blocks/9/norm1/bias/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024],"zarr_format":2}
model/model/visual/blocks/9/norm1/bias/0 ADDED
Binary file (1.68 kB). View file
 
model/model/visual/blocks/9/norm1/scale/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024],"zarr_format":2}
model/model/visual/blocks/9/norm1/scale/0 ADDED
Binary file (1.3 kB). View file
 
model/model/visual/blocks/9/norm2/bias/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024],"zarr_format":2}
model/model/visual/blocks/9/norm2/bias/0 ADDED
Binary file (1.68 kB). View file
 
model/model/visual/blocks/9/norm2/scale/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024],"zarr_format":2}
model/model/visual/blocks/9/norm2/scale/0 ADDED
Binary file (1.23 kB). View file
 
model/model/visual/merger/linear_fc1/bias/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[4096],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[4096],"zarr_format":2}
model/model/visual/merger/linear_fc1/bias/0 ADDED
Binary file (6.45 kB). View file
 
model/model/visual/merger/linear_fc1/kernel/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[1024,4096],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[4096,4096],"zarr_format":2}
model/model/visual/merger/linear_fc2/bias/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[2048],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[2048],"zarr_format":2}
model/model/visual/merger/linear_fc2/bias/0 ADDED
Binary file (3.28 kB). View file
 
model/model/visual/merger/linear_fc2/kernel/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[4096,512],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[4096,2048],"zarr_format":2}
model/model/visual/merger/norm/bias/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024],"zarr_format":2}
model/model/visual/merger/norm/bias/0 ADDED
Binary file (1.66 kB). View file
 
model/model/visual/merger/norm/scale/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024],"zarr_format":2}
model/model/visual/merger/norm/scale/0 ADDED
Binary file (1.06 kB). View file
 
model/model/visual/patch_embed/proj/bias/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[1024],"zarr_format":2}
model/model/visual/patch_embed/proj/bias/0 ADDED
Binary file (1.68 kB). View file
 
model/model/visual/patch_embed/proj/kernel/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[2,16,16,3,1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[2,16,16,3,1024],"zarr_format":2}
model/model/visual/pos_embed/embedding/.zarray ADDED
@@ -0,0 +1 @@
 
 
1
+ {"chunks":[576,1024],"compressor":{"id":"zstd","level":1},"dimension_separator":".","dtype":"bfloat16","fill_value":null,"filters":null,"order":"C","shape":[2304,1024],"zarr_format":2}