liger-kernel 0.3.1__py3-none-any.whl → 0.4.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- liger_kernel/env_report.py +2 -0
- liger_kernel/ops/cross_entropy.py +144 -65
- liger_kernel/ops/experimental/mm_int8int2.py +355 -0
- liger_kernel/ops/fused_linear_cross_entropy.py +31 -11
- liger_kernel/ops/fused_linear_jsd.py +245 -0
- liger_kernel/ops/geglu.py +2 -2
- liger_kernel/ops/group_norm.py +322 -0
- liger_kernel/ops/jsd.py +176 -0
- liger_kernel/ops/kl_div.py +2 -2
- liger_kernel/ops/rms_norm.py +92 -46
- liger_kernel/ops/swiglu.py +2 -2
- liger_kernel/ops/utils.py +62 -1
- liger_kernel/transformers/__init__.py +3 -0
- liger_kernel/transformers/cross_entropy.py +44 -12
- liger_kernel/transformers/functional.py +38 -1
- liger_kernel/transformers/fused_linear_cross_entropy.py +31 -4
- liger_kernel/transformers/fused_linear_jsd.py +98 -0
- liger_kernel/transformers/group_norm.py +56 -0
- liger_kernel/transformers/jsd.py +75 -0
- liger_kernel/transformers/model/gemma.py +124 -1
- liger_kernel/transformers/model/gemma2.py +277 -0
- liger_kernel/transformers/model/llama.py +135 -4
- liger_kernel/transformers/model/mistral.py +3 -0
- liger_kernel/transformers/model/mixtral.py +153 -2
- liger_kernel/transformers/model/mllama.py +274 -0
- liger_kernel/transformers/model/phi3.py +140 -2
- liger_kernel/transformers/model/qwen2.py +123 -2
- liger_kernel/transformers/model/qwen2_vl.py +8 -1
- liger_kernel/transformers/monkey_patch.py +258 -68
- liger_kernel/transformers/rms_norm.py +11 -3
- {liger_kernel-0.3.1.dist-info → liger_kernel-0.4.1.dist-info}/METADATA +63 -29
- liger_kernel-0.4.1.dist-info/NOTICE +58 -0
- liger_kernel-0.4.1.dist-info/RECORD +51 -0
- {liger_kernel-0.3.1.dist-info → liger_kernel-0.4.1.dist-info}/WHEEL +1 -1
- liger_kernel-0.3.1.dist-info/NOTICE +0 -4
- liger_kernel-0.3.1.dist-info/RECORD +0 -42
- {liger_kernel-0.3.1.dist-info → liger_kernel-0.4.1.dist-info}/LICENSE +0 -0
- {liger_kernel-0.3.1.dist-info → liger_kernel-0.4.1.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: liger_kernel
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: Efficient Triton kernels for LLM Training
|
|
5
5
|
License: BSD 2-CLAUSE LICENSE
|
|
6
6
|
Copyright 2024 LinkedIn Corporation
|
|
@@ -31,7 +31,7 @@ Description-Content-Type: text/markdown
|
|
|
31
31
|
License-File: LICENSE
|
|
32
32
|
License-File: NOTICE
|
|
33
33
|
Requires-Dist: torch>=2.1.2
|
|
34
|
-
Requires-Dist: triton>=2.3.
|
|
34
|
+
Requires-Dist: triton>=2.3.1
|
|
35
35
|
Provides-Extra: dev
|
|
36
36
|
Requires-Dist: transformers>=4.44.2; extra == "dev"
|
|
37
37
|
Requires-Dist: matplotlib>=3.7.2; extra == "dev"
|
|
@@ -40,10 +40,13 @@ Requires-Dist: black>=24.4.2; extra == "dev"
|
|
|
40
40
|
Requires-Dist: isort>=5.13.2; extra == "dev"
|
|
41
41
|
Requires-Dist: pytest>=7.1.2; extra == "dev"
|
|
42
42
|
Requires-Dist: datasets>=2.19.2; extra == "dev"
|
|
43
|
+
Requires-Dist: torchvision>=0.16.2; extra == "dev"
|
|
43
44
|
Requires-Dist: seaborn; extra == "dev"
|
|
44
45
|
Provides-Extra: transformers
|
|
45
46
|
Requires-Dist: transformers~=4.0; extra == "transformers"
|
|
46
47
|
|
|
48
|
+
<a name="readme-top"></a>
|
|
49
|
+
|
|
47
50
|
# Liger Kernel: Efficient Triton Kernels for LLM Training
|
|
48
51
|
|
|
49
52
|
|
|
@@ -52,6 +55,7 @@ Requires-Dist: transformers~=4.0; extra == "transformers"
|
|
|
52
55
|
<th style="padding: 10px;" colspan="2">Stable</th>
|
|
53
56
|
<th style="padding: 10px;" colspan="2">Nightly</th>
|
|
54
57
|
<th style="padding: 10px;">Discord</th>
|
|
58
|
+
<th style="padding: 10px;">Gurubase (experimental)</th>
|
|
55
59
|
</tr>
|
|
56
60
|
<tr>
|
|
57
61
|
<td style="padding: 10px;">
|
|
@@ -79,6 +83,11 @@ Requires-Dist: transformers~=4.0; extra == "transformers"
|
|
|
79
83
|
<img src="https://dcbadge.vercel.app/api/server/gpumode?style=flat" alt="Join Our Discord">
|
|
80
84
|
</a>
|
|
81
85
|
</td>
|
|
86
|
+
<td style="padding: 10px;">
|
|
87
|
+
<a href="https://gurubase.io/g/liger-kernel">
|
|
88
|
+
<img src="https://img.shields.io/badge/Gurubase-Ask%20Liger%20Kernel%20Guru-006BFF" alt="Ask Liger Kernel Guru">
|
|
89
|
+
</a>
|
|
90
|
+
</td>
|
|
82
91
|
</tr>
|
|
83
92
|
</table>
|
|
84
93
|
|
|
@@ -86,11 +95,12 @@ Requires-Dist: transformers~=4.0; extra == "transformers"
|
|
|
86
95
|
|
|
87
96
|
<img src="https://raw.githubusercontent.com/linkedin/Liger-Kernel/main/docs/images/logo-banner.png">
|
|
88
97
|
|
|
89
|
-
[Installation](#installation) | [Getting Started](#getting-started) | [Examples](#examples) | [APIs](#apis) | [
|
|
98
|
+
[Installation](#installation) | [Getting Started](#getting-started) | [Examples](#examples) | [APIs](#apis) | [Cite our work](#cite-this-work)
|
|
90
99
|
|
|
91
100
|
<details>
|
|
92
101
|
<summary>Latest News 🔥</summary>
|
|
93
|
-
|
|
102
|
+
|
|
103
|
+
- [2024/10/21] We have released the tech report of Liger Kernel on Arxiv: https://arxiv.org/pdf/2410.10989
|
|
94
104
|
- [2024/9/6] We release v0.2.1 ([X post](https://x.com/liger_kernel/status/1832168197002510649)). 2500+ Stars, 10+ New Contributors, 50+ PRs, 50k Downloads in two weeks!
|
|
95
105
|
- [2024/8/31] CUDA MODE talk, [Liger-Kernel: Real-world Triton kernel for LLM Training](https://youtu.be/gWble4FreV4?si=dxPeIchhkJ36Mbns), [Slides](https://github.com/cuda-mode/lectures?tab=readme-ov-file#lecture-28-liger-kernel)
|
|
96
106
|
- [2024/8/23] Official release: check out our [X post](https://x.com/hsu_byron/status/1827072737673982056)
|
|
@@ -148,11 +158,18 @@ With one line of code, Liger Kernel can increase throughput by more than 20% and
|
|
|
148
158
|
|
|
149
159
|
## Installation
|
|
150
160
|
|
|
151
|
-
### Dependencies
|
|
161
|
+
### Dependencies
|
|
162
|
+
|
|
163
|
+
#### CUDA
|
|
152
164
|
|
|
153
165
|
- `torch >= 2.1.2`
|
|
154
166
|
- `triton >= 2.3.0`
|
|
155
167
|
|
|
168
|
+
#### ROCm
|
|
169
|
+
|
|
170
|
+
- `torch >= 2.5.0` Install according to the instruction in Pytorch official webpage.
|
|
171
|
+
- `triton >= 3.0.0` Install from pypi. (e.g. `pip install triton==3.0.0`)
|
|
172
|
+
|
|
156
173
|
### Optional Dependencies
|
|
157
174
|
|
|
158
175
|
- `transformers >= 4.x`: Required if you plan to use the transformers models patching APIs. The specific model you are working will dictate the minimum version of transformers.
|
|
@@ -182,6 +199,7 @@ pip install -e .
|
|
|
182
199
|
pip install -e .[transformers]
|
|
183
200
|
```
|
|
184
201
|
|
|
202
|
+
|
|
185
203
|
## Getting Started
|
|
186
204
|
|
|
187
205
|
There are a couple of ways to apply Liger kernels, depending on the level of customization required.
|
|
@@ -274,10 +292,11 @@ loss.backward()
|
|
|
274
292
|
| **Model** | **API** | **Supported Operations** |
|
|
275
293
|
|-------------|--------------------------------------------------------------|-------------------------------------------------------------------------|
|
|
276
294
|
| LLaMA 2 & 3 | `liger_kernel.transformers.apply_liger_kernel_to_llama` | RoPE, RMSNorm, SwiGLU, CrossEntropyLoss, FusedLinearCrossEntropy |
|
|
295
|
+
| LLaMA 3.2-Vision | `liger_kernel.transformers.apply_liger_kernel_to_mllama` | RoPE, RMSNorm, SwiGLU, CrossEntropyLoss, FusedLinearCrossEntropy |
|
|
277
296
|
| Mistral | `liger_kernel.transformers.apply_liger_kernel_to_mistral` | RoPE, RMSNorm, SwiGLU, CrossEntropyLoss, FusedLinearCrossEntropy |
|
|
278
297
|
| Mixtral | `liger_kernel.transformers.apply_liger_kernel_to_mixtral` | RoPE, RMSNorm, SwiGLU, CrossEntropyLoss, FusedLinearCrossEntropy |
|
|
279
298
|
| Gemma1 | `liger_kernel.transformers.apply_liger_kernel_to_gemma` | RoPE, RMSNorm, GeGLU, CrossEntropyLoss, FusedLinearCrossEntropy |
|
|
280
|
-
| Gemma2 | `liger_kernel.transformers.apply_liger_kernel_to_gemma2` | RoPE, RMSNorm, GeGLU, CrossEntropyLoss |
|
|
299
|
+
| Gemma2 | `liger_kernel.transformers.apply_liger_kernel_to_gemma2` | RoPE, RMSNorm, GeGLU, CrossEntropyLoss, FusedLinearCrossEntropy |
|
|
281
300
|
| Qwen2 & Qwen2.5 | `liger_kernel.transformers.apply_liger_kernel_to_qwen2` | RoPE, RMSNorm, SwiGLU, CrossEntropyLoss, FusedLinearCrossEntropy |
|
|
282
301
|
| Qwen2-VL | `liger_kernel.transformers.apply_liger_kernel_to_qwen2_vl` | RMSNorm, LayerNorm, SwiGLU, CrossEntropyLoss, FusedLinearCrossEntropy |
|
|
283
302
|
| Phi3 & Phi3.5 | `liger_kernel.transformers.apply_liger_kernel_to_phi3` | RoPE, RMSNorm, SwiGLU, CrossEntropyLoss, FusedLinearCrossEntropy |
|
|
@@ -296,9 +315,12 @@ loss.backward()
|
|
|
296
315
|
| CrossEntropy | `liger_kernel.transformers.LigerCrossEntropyLoss` |
|
|
297
316
|
| FusedLinearCrossEntropy | `liger_kernel.transformers.LigerFusedLinearCrossEntropyLoss`|
|
|
298
317
|
| KLDivergence | `liger_kernel.transformers.LigerKLDIVLoss` |
|
|
318
|
+
| JSD | `liger_kernel.transformers.LigerJSD` |
|
|
319
|
+
| FusedLinearJSD | `liger_kernel.transformers.LigerFusedLinearJSD` |
|
|
299
320
|
|
|
300
321
|
- **RMSNorm**: [RMSNorm](https://arxiv.org/pdf/1910.07467), which normalizes activations using their root mean square, is implemented by fusing the normalization and scaling steps into a single Triton kernel, and achieves ~3X speedup with ~3X peak memory reduction.
|
|
301
322
|
- **LayerNorm**: [LayerNorm](https://arxiv.org/pdf/1607.06450), which centers and normalizes activations across the feature dimension, is implemented by fusing the centering, normalization and scaling steps into a single Triton kernel, and achieves ~2X speedup.
|
|
323
|
+
- **GroupNorm**: [GroupNorm](https://arxiv.org/pdf/1803.08494), which normalizes activations across the group dimension for a given sample. Channels are grouped in K groups over which the normalization is performed, is implemented by fusing the centering, normalization and scaling steps into a single Triton kernel, and can achieve up to ~2X speedup as the number of channels/groups increases.
|
|
302
324
|
- **RoPE**: [Rotary Positional Embedding](https://arxiv.org/pdf/2104.09864) is implemented by fusing the query and key embedding rotary into a single kernel with inplace replacement, and achieves ~3X speedup with ~3X peak memory reduction.
|
|
303
325
|
- **SwiGLU**: [Swish Gated Linear Units](https://arxiv.org/pdf/2002.05202), given by
|
|
304
326
|
$$\text{SwiGLU}(x)=\text{Swish}_{\beta}(xW+b)\otimes(xV+c)$$
|
|
@@ -310,35 +332,23 @@ $$\text{GeGLU}(x)=\text{GELU}(xW+b)\otimes(xV+c)$$
|
|
|
310
332
|
<!-- TODO: verify vocab sizes are accurate -->
|
|
311
333
|
- **FusedLinearCrossEntropy**: Peak memory usage of cross entropy loss is further improved by fusing the model head with the CE loss and chunking the input for block-wise loss and gradient calculation, a technique inspired by [Efficient Cross Entropy](https://github.com/mgmalek/efficient_cross_entropy). It achieves >4X memory reduction for 128k vocab size. **This is highly effective for large batch size, large sequence length, and large vocabulary sizes.** Please refer to the [Medusa example](https://github.com/linkedin/Liger-Kernel/tree/main/examples/medusa) for individual kernel usage.
|
|
312
334
|
- **KLDivergence**: [KL Divergence](https://pytorch.org/docs/stable/generated/torch.nn.KLDivLoss.html) is implemented by fusing the forward into a single triton kernel, with reduction done outside the kernel. It achieves ~1.5X speed and ~15% memory reduction for 128K vocab size.
|
|
335
|
+
- **JSD**: [Generalized JSD](https://arxiv.org/pdf/2306.13649) (Jensen-Shannon divergence), is implemented by computing both the loss and gradient in the forward pass. It achieves ~1.5X speed and ~54% memory reduction for 128k vocab size.
|
|
336
|
+
- **FusedLinearJSD**: Peak memory usage of JSD loss is further improved by fusing the model head with the JSD and chunking the input for block-wise loss and gradient calculation. It achieves ~85% memory reduction for 128k vocab size where batch size $\times$ sequence length is 8192.
|
|
337
|
+
|
|
313
338
|
|
|
314
339
|
### Experimental Kernels
|
|
315
340
|
|
|
316
341
|
| **Kernel** | **API** |
|
|
317
342
|
|---------------------------------|-------------------------------------------------------------|
|
|
318
343
|
| Embedding | `liger_kernel.transformers.experimental.LigerEmbedding` |
|
|
319
|
-
|
|
344
|
+
| Matmul int2xint8 | `liger_kernel.transformers.experimental.matmul`
|
|
320
345
|
|
|
321
346
|
- **Embedding**: [Embedding](https://pytorch.org/docs/stable/generated/torch.nn.Embedding.html) is implemented by fusing embedding lookup and output operations. It achieves a peak speedup of ~1.5x in the forward pass and an overall speedup of ~1.1x.
|
|
322
|
-
|
|
347
|
+
- **Matmul int2xint8**: is implemented by using the cache tiled matrix multiplication and by fusing the matmul with the unpacking process which achieves a considerable speed up and performs on par with @torch.compile
|
|
323
348
|
<!-- TODO: be more specific about batch size -->
|
|
324
349
|
> **Note:**
|
|
325
350
|
> Reported speedups and memory reductions are with respect to the LLaMA 3-8B Hugging Face layer implementations. All models use 4K hidden size and 4K sequence length and are evaluated based on memory usage and wall time for the forward+backward pass on a single NVIDIA A100 80G GPU using small batch sizes. Liger kernels exhibit more efficient scaling to larger batch sizes, detailed further in the [Benchmark](./benchmark) folder.
|
|
326
351
|
|
|
327
|
-
## Note on ML Compiler
|
|
328
|
-
|
|
329
|
-
### Torch Compile
|
|
330
|
-
|
|
331
|
-
Since Liger Kernel is 100% Triton-based, it works seamlessly with [`torch.compile`](https://pytorch.org/tutorials/intermediate/torch_compile_tutorial.html). In the following example, Liger Kernel can further optimize the model on top of Torch Compile, reducing the memory by more than half.
|
|
332
|
-
|
|
333
|
-
| Configuration | Throughput (tokens/sec) | Memory Reserved (GB) |
|
|
334
|
-
|--------------------------------|----------------------------|-------------------------|
|
|
335
|
-
| Torch Compile | 3780 | 66.4 |
|
|
336
|
-
| Torch Compile + Liger Kernel | 3702 | 31.0 |
|
|
337
|
-
|
|
338
|
-
> **Note:**
|
|
339
|
-
> 1. Benchmark conditions: LLaMA 3-8B, Batch Size = 8, Seq Len = 4096, Data Type = `bf16`, Optimizer = AdamW, Gradient Checkpointing = True, Distributed Strategy = FSDP1 on 8 A100s.
|
|
340
|
-
> 2. Tested on torch `2.5.0.dev20240731+cu118`
|
|
341
|
-
|
|
342
352
|
## Contributing
|
|
343
353
|
|
|
344
354
|
[CONTRIBUTING GUIDE](https://github.com/linkedin/Liger-Kernel/blob/main/CONTRIBUTING.md)
|
|
@@ -372,7 +382,14 @@ Many thanks to the contributors to these projects for their invaluable work that
|
|
|
372
382
|
|
|
373
383
|
## License
|
|
374
384
|
|
|
375
|
-
[BSD 2-CLAUSE](https://github.com/linkedin/Liger-Kernel/blob/main/LICENSE)
|
|
385
|
+
This project is licensed under the [BSD 2-CLAUSE](https://github.com/linkedin/Liger-Kernel/blob/main/LICENSE) License (see `LICENSE` for details).
|
|
386
|
+
It also includes components from projects licensed under:
|
|
387
|
+
|
|
388
|
+
- Apache License 2.0 (see `LICENSE-APACHE-2.0` for details).
|
|
389
|
+
- MIT License (see `LICENSE-MIT-AutoAWQ` for details).
|
|
390
|
+
- MIT License (see `LICENSE-MIT-Efficient Cross Entropy` for details).
|
|
391
|
+
- MIT License (see `LICENSE-MIT-llmc` for details).
|
|
392
|
+
- MIT License (see `LICENSE-MIT-triton` for details).
|
|
376
393
|
|
|
377
394
|
## Contact
|
|
378
395
|
|
|
@@ -383,13 +400,30 @@ Many thanks to the contributors to these projects for their invaluable work that
|
|
|
383
400
|
|
|
384
401
|
Biblatex entry:
|
|
385
402
|
```bib
|
|
386
|
-
@
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
403
|
+
@article{hsu2024ligerkernelefficienttriton,
|
|
404
|
+
title={Liger Kernel: Efficient Triton Kernels for LLM Training},
|
|
405
|
+
author={Pin-Lun Hsu and Yun Dai and Vignesh Kothapalli and Qingquan Song and Shao Tang and Siyu Zhu and Steven Shimizu and Shivam Sahni and Haowen Ning and Yanning Chen},
|
|
406
|
+
year={2024},
|
|
407
|
+
eprint={2410.10989},
|
|
408
|
+
archivePrefix={arXiv},
|
|
409
|
+
primaryClass={cs.LG},
|
|
410
|
+
url={https://arxiv.org/abs/2410.10989},
|
|
411
|
+
journal={arXiv preprint arXiv:2410.10989},
|
|
391
412
|
}
|
|
392
413
|
```
|
|
393
414
|
|
|
394
415
|
## Star History
|
|
395
416
|
[](https://star-history.com/#linkedin/Liger-Kernel&Date)
|
|
417
|
+
|
|
418
|
+
## Contributors
|
|
419
|
+
|
|
420
|
+
<a href="https://github.com/linkedin/Liger-Kernel/graphs/contributors">
|
|
421
|
+
<img alt="contributors" src="https://contrib.rocks/image?repo=linkedin/Liger-Kernel"/>
|
|
422
|
+
</a>
|
|
423
|
+
|
|
424
|
+
<p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
|
|
425
|
+
<a href="#readme-top" style="text-decoration: none; color: #007bff; font-weight: bold;">
|
|
426
|
+
↑ Back to Top ↑
|
|
427
|
+
</a>
|
|
428
|
+
</p>
|
|
429
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
Copyright 2024 LinkedIn Corporation
|
|
2
|
+
All Rights Reserved.
|
|
3
|
+
|
|
4
|
+
Licensed under the BSD 2-Clause License (the "License"). See License in the project root for license information.
|
|
5
|
+
|
|
6
|
+
This product includes software developed by LinkedIn Corporation.
|
|
7
|
+
|
|
8
|
+
This product contains code derived from the following open source projects:
|
|
9
|
+
|
|
10
|
+
1. Unsloth
|
|
11
|
+
Copyright (c) 2023 Unsloth AI
|
|
12
|
+
Licensed under the Apache License, Version 2.0
|
|
13
|
+
Source: https://github.com/unslothai/unsloth
|
|
14
|
+
|
|
15
|
+
The `calculate_settings` function to determine block size and warp is reused for Norm and MLP operations.
|
|
16
|
+
Modifications and additions were made to the RMS Norm implementation.
|
|
17
|
+
|
|
18
|
+
2. Triton
|
|
19
|
+
Copyright (c) 2023 OpenAI
|
|
20
|
+
Licensed under the MIT License
|
|
21
|
+
Source: https://github.com/openai/triton
|
|
22
|
+
|
|
23
|
+
Modifications were made based on Triton tutorials for the RMS Norm implementation.
|
|
24
|
+
|
|
25
|
+
3. Efficient Cross Entropy
|
|
26
|
+
Copyright (c) 2023 Mohamed Malek
|
|
27
|
+
Licensed under the MIT License
|
|
28
|
+
Source: https://github.com/mgmalek/efficient_cross_entropy
|
|
29
|
+
|
|
30
|
+
The idea of gradient-in-forward and chunking was used in the Linear Cross Entropy implementation.
|
|
31
|
+
|
|
32
|
+
4. Flash Attention
|
|
33
|
+
Copyright (c) 2023 Tri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra, Christopher Ré
|
|
34
|
+
Licensed under the BSD 3-Clause License
|
|
35
|
+
Source: https://github.com/Dao-AILab/flash-attention
|
|
36
|
+
|
|
37
|
+
Optimization ideas such as tiling and recomputation were inspired by this work.
|
|
38
|
+
|
|
39
|
+
5. AutoAWQ
|
|
40
|
+
Copyright (c) 2023 Casper Hansen
|
|
41
|
+
Licensed under the MIT License
|
|
42
|
+
Source: https://github.com/casper-hansen/AutoAWQ
|
|
43
|
+
|
|
44
|
+
The design of the automodel was referenced from this project.
|
|
45
|
+
|
|
46
|
+
6. llm.c
|
|
47
|
+
Copyright (c) 2023 Andrej Karpathy
|
|
48
|
+
Licensed under the MIT License
|
|
49
|
+
Source: https://github.com/karpathy/llm.c
|
|
50
|
+
|
|
51
|
+
The design of end-to-end testing was referenced from this project.
|
|
52
|
+
|
|
53
|
+
7. Tiny Shakespeare Dataset
|
|
54
|
+
Source: https://huggingface.co/datasets/karpathy/tiny_shakespeare
|
|
55
|
+
|
|
56
|
+
This dataset is used to conduct convergence tests on mini models.
|
|
57
|
+
|
|
58
|
+
For full license texts, please refer to the respective project repositories.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
liger_kernel/env_report.py,sha256=jye8RvUkmhqaIshdeIpoUABoAu7FPKJUib4FnAfvkpw,1132
|
|
2
|
+
liger_kernel/ops/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
liger_kernel/ops/cross_entropy.py,sha256=sfUb7-jIZp0EKXjg1DYy2Wdzw_Mg-mHmGoR5bpdm4tw,15526
|
|
4
|
+
liger_kernel/ops/fused_linear_cross_entropy.py,sha256=JPiQ0TgPjtQ-3F5ovC0b5ZnBk067XUmzyNuGO3KZv44,9963
|
|
5
|
+
liger_kernel/ops/fused_linear_jsd.py,sha256=5D_obamh08lGGTMyh85kBJD_aNjPhOYf4-TmCZ6m4s4,9626
|
|
6
|
+
liger_kernel/ops/geglu.py,sha256=MQL4zyzneZqZYUGPvb1QjI_EYT9_pKfSDgR25WD9jrI,4127
|
|
7
|
+
liger_kernel/ops/group_norm.py,sha256=VaRErVJGR4JqgXXvuIjNGTn3E2egjLtU1y3ymwIf4d8,10961
|
|
8
|
+
liger_kernel/ops/jsd.py,sha256=anWfdioucxZy4JQfTvbHBR-IQrZKeH-gBF1MHwwTuTQ,5781
|
|
9
|
+
liger_kernel/ops/kl_div.py,sha256=03FNXfvCb6M-56hhFepAFV9p6brArPR6KOKkdGD34mw,8374
|
|
10
|
+
liger_kernel/ops/layer_norm.py,sha256=unGMYMOPqtkM9aTrokhcqgPmsV2AUN7Yzv86isVB9OI,7422
|
|
11
|
+
liger_kernel/ops/rms_norm.py,sha256=LAxCiFjpBbb7TDh9pOzsVmDGAR7eEbTDnEhjSd6TX_M,11583
|
|
12
|
+
liger_kernel/ops/rope.py,sha256=jrzaA9-6Orn44y_IIam9_YNPQxOFK2FrIRNfFea4EtU,8513
|
|
13
|
+
liger_kernel/ops/swiglu.py,sha256=Fwxtd76rhHKT9ShQAGca9RsnASplAVxtYKHmiT73_yA,2994
|
|
14
|
+
liger_kernel/ops/utils.py,sha256=3JSF--O7KT5Wa5BuO70M4h0XetxoZ_e9IoW9GRlxlBg,3777
|
|
15
|
+
liger_kernel/ops/experimental/embedding.py,sha256=LYR66dB-jhvhtUjeV4PnNro-n77J1mdlmpSLSxB3Y6U,4186
|
|
16
|
+
liger_kernel/ops/experimental/mm_int8int2.py,sha256=JpGVZCgRC6T8XMUJ_QbZRS2XU1bh0urIZphs5DTc1mY,13358
|
|
17
|
+
liger_kernel/transformers/__init__.py,sha256=gia-eBxr7TLxU0GdDf8AfCY4WgDlFLqIGSt7EoQGsBA,1336
|
|
18
|
+
liger_kernel/transformers/auto_model.py,sha256=RMIwQHSiXoksXFTIqFZ4PLBgoqkxJJAT3q1Qh47bGN8,1552
|
|
19
|
+
liger_kernel/transformers/cross_entropy.py,sha256=yEm_YQ7oa3_BzT3hdW6KrAslduhSqWcJQVNZZDcWCg4,1758
|
|
20
|
+
liger_kernel/transformers/functional.py,sha256=Hd4WvxNqOJHM9HmRfAQueRnmOy5WU9nFsFygB5Iv8Xs,2000
|
|
21
|
+
liger_kernel/transformers/fused_linear_cross_entropy.py,sha256=_i0PXSp5iZ9pKXdEeZ4lvHCENJYjV4y74yz3ZRG5XQg,1484
|
|
22
|
+
liger_kernel/transformers/fused_linear_jsd.py,sha256=MJ-KjmLZnakuoVpnbDGkd95DQgvESniyrRWYzollVZM,4066
|
|
23
|
+
liger_kernel/transformers/geglu.py,sha256=QcrME_8ooIn0xa59LaC0aoOdRrBIFd11Y0bAyF0NfCw,1130
|
|
24
|
+
liger_kernel/transformers/group_norm.py,sha256=FJ9R7mS9G1wO-GRIQ6QKSmIhnZ6nQ6GIkE4NnX_hnn0,2241
|
|
25
|
+
liger_kernel/transformers/jsd.py,sha256=W-5CypO2mx4-bUWOxq1KScfCdoXlLoYbtt5xBnRzMs4,3056
|
|
26
|
+
liger_kernel/transformers/kl_div.py,sha256=qVhjBg6tjRyue5iZ3NFxo8uySY4JuIFJyv0IM_50F24,431
|
|
27
|
+
liger_kernel/transformers/layer_norm.py,sha256=fd6o4kSHJWolQMWxh-l1qObfgL08ruNbUoBiANKX1ow,972
|
|
28
|
+
liger_kernel/transformers/monkey_patch.py,sha256=rhLJlc-Dpdo7kVYssjw5sEEbPuG18ZxIIxKf8AgrLjg,38200
|
|
29
|
+
liger_kernel/transformers/rms_norm.py,sha256=AHstklNIO1PLHjjCBU-TPuUD-Fl_pycJUTLlJNojbV8,1189
|
|
30
|
+
liger_kernel/transformers/rope.py,sha256=m-ah8vZBYW8tfplTXCiAPMHJWlB1tdp_JPXJeWE-Boo,943
|
|
31
|
+
liger_kernel/transformers/swiglu.py,sha256=0-tVJ8xEYfhxnduc16PflXFj8sZPxdx9sHUn3hfwCI4,2468
|
|
32
|
+
liger_kernel/transformers/trainer_integration.py,sha256=W3ON51O5GkyzNJsItz0y5rKx-uy2f2cFfveZpqbUdhw,123
|
|
33
|
+
liger_kernel/transformers/experimental/embedding.py,sha256=HpckiAMKM8-SRxKDcGTqortVxnjhwpZsfsp9lfjqfeM,895
|
|
34
|
+
liger_kernel/transformers/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
+
liger_kernel/transformers/model/gemma.py,sha256=R4huxuR48gkLrdT8KqV7As2v9dZtEmcGVz6YG1ZmuJE,9692
|
|
36
|
+
liger_kernel/transformers/model/gemma2.py,sha256=zxQsxCRqkoxCES3GJPVI7soUuF3J5HZDlvJgaBos1zM,10836
|
|
37
|
+
liger_kernel/transformers/model/llama.py,sha256=RinsgC_eR-YNvZd2SHPQxZ4eyR3uViaTFCM3SvI5nks,10426
|
|
38
|
+
liger_kernel/transformers/model/mistral.py,sha256=XpL1rlWg_llvW3z_Hf_d8WQs7uQaH4ds7EZ2SxjQHsU,5144
|
|
39
|
+
liger_kernel/transformers/model/mixtral.py,sha256=nyDS1dBpsOXYC2DuW59Hgu7ZrGftrHuWPfNqjcNPIxs,11503
|
|
40
|
+
liger_kernel/transformers/model/mllama.py,sha256=mesNCgj0Ea1O-fqRD4LVxDJ1CR2abY_zAzK_bfVzkiU,11222
|
|
41
|
+
liger_kernel/transformers/model/phi3.py,sha256=xUZPlaPKwknLjHc3uUW3EPodm1h0vD3G7Qnhh51v-Io,10332
|
|
42
|
+
liger_kernel/transformers/model/qwen2.py,sha256=EyhSSzQOskGjSnCsKMZpd1s5IAIlHd5PBO3q0MoCs00,9619
|
|
43
|
+
liger_kernel/transformers/model/qwen2_vl.py,sha256=j6xAhp9AG195dsZK5f8dFYVM9uKtWApZrggT5Y08jn4,7055
|
|
44
|
+
liger_kernel/triton/__init__.py,sha256=yfRe0zMb47QnqjecZWG7LnanfCTzeku7SgWRAwNVmzU,101
|
|
45
|
+
liger_kernel/triton/monkey_patch.py,sha256=5BcGKTtdqeYchypBIBopGIWPx1-cFALz7sOKoEsqXJ0,1584
|
|
46
|
+
liger_kernel-0.4.1.dist-info/LICENSE,sha256=OhzLDHJ0to4a8sodVLELZiCFylZ1NAAYLs-HrjPy0ag,1312
|
|
47
|
+
liger_kernel-0.4.1.dist-info/METADATA,sha256=OnLdlwVJQOG6ltS03JV1jPduSnv2QD644GhGK3HAwbw,28095
|
|
48
|
+
liger_kernel-0.4.1.dist-info/NOTICE,sha256=njwnoPZLh9AN8SJQzxvCGLHi-8X__AvWRze6joNXIY8,2066
|
|
49
|
+
liger_kernel-0.4.1.dist-info/WHEEL,sha256=a7TGlA-5DaHMRrarXjVbQagU3Man_dCnGIWMJr5kRWo,91
|
|
50
|
+
liger_kernel-0.4.1.dist-info/top_level.txt,sha256=2eghu4hA3LnkM7ElW92tQ8zegWKgSbeo-k-aGe1YnvY,13
|
|
51
|
+
liger_kernel-0.4.1.dist-info/RECORD,,
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
liger_kernel/env_report.py,sha256=LFUJ6UMkFFGPBYXBlqHFGy4bhsemEpSI-_1edSazlHI,1130
|
|
2
|
-
liger_kernel/ops/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
liger_kernel/ops/cross_entropy.py,sha256=6uoPScKpXJ7gdBlOpSnZcQ5fQe52JHYjUVsr_Bf4kCE,12317
|
|
4
|
-
liger_kernel/ops/fused_linear_cross_entropy.py,sha256=XLKDHBMbqD6nH2mfFLmA1UoU-N7CpKWHp4L3itWoHCs,9321
|
|
5
|
-
liger_kernel/ops/geglu.py,sha256=ErnNAgoMDCd8pqTh18Resl5JHCaRpRruH2jZ9_Y9CvA,4131
|
|
6
|
-
liger_kernel/ops/kl_div.py,sha256=qnmtFQwuO3FR7Ovup_DDzpkD1A1LpwOaWlcO6K9ysHk,8342
|
|
7
|
-
liger_kernel/ops/layer_norm.py,sha256=unGMYMOPqtkM9aTrokhcqgPmsV2AUN7Yzv86isVB9OI,7422
|
|
8
|
-
liger_kernel/ops/rms_norm.py,sha256=4miEoDSdsc0GuhI3BpBRxt6iieFQcN2QnNp4o8PVB98,9921
|
|
9
|
-
liger_kernel/ops/rope.py,sha256=jrzaA9-6Orn44y_IIam9_YNPQxOFK2FrIRNfFea4EtU,8513
|
|
10
|
-
liger_kernel/ops/swiglu.py,sha256=qxNpfYUB9abS-v8yiuzQn9oYHA2P_l4wT19m8GkCa_c,2998
|
|
11
|
-
liger_kernel/ops/utils.py,sha256=Y5sbRuZVoswsMzITTTiFgITJN2QO0K4McAAUncE3UnE,1941
|
|
12
|
-
liger_kernel/ops/experimental/embedding.py,sha256=LYR66dB-jhvhtUjeV4PnNro-n77J1mdlmpSLSxB3Y6U,4186
|
|
13
|
-
liger_kernel/transformers/__init__.py,sha256=UP5NP8yJhkFkjLVTkFRU0w0CA49hwdhqwmIgaBAEcj0,1148
|
|
14
|
-
liger_kernel/transformers/auto_model.py,sha256=RMIwQHSiXoksXFTIqFZ4PLBgoqkxJJAT3q1Qh47bGN8,1552
|
|
15
|
-
liger_kernel/transformers/cross_entropy.py,sha256=gL30VByCSA_iQSkhV6no70x_IUqqFSTMJdytppico_w,804
|
|
16
|
-
liger_kernel/transformers/functional.py,sha256=gXviuzvWjkSLfNGUWLKDnp4s6ATpvz7309kov6JKp0Y,906
|
|
17
|
-
liger_kernel/transformers/fused_linear_cross_entropy.py,sha256=-07t8YRajZTrJOG2rUzt6Ur7kNuWgarWcqy7ou5Da8k,629
|
|
18
|
-
liger_kernel/transformers/geglu.py,sha256=QcrME_8ooIn0xa59LaC0aoOdRrBIFd11Y0bAyF0NfCw,1130
|
|
19
|
-
liger_kernel/transformers/kl_div.py,sha256=qVhjBg6tjRyue5iZ3NFxo8uySY4JuIFJyv0IM_50F24,431
|
|
20
|
-
liger_kernel/transformers/layer_norm.py,sha256=fd6o4kSHJWolQMWxh-l1qObfgL08ruNbUoBiANKX1ow,972
|
|
21
|
-
liger_kernel/transformers/monkey_patch.py,sha256=HtyeNNVJTOVN_UrI8piaG7_0An9-fgUXfIZfOlxx_os,28474
|
|
22
|
-
liger_kernel/transformers/rms_norm.py,sha256=4XfMQI6dORF7s_5qUqVHKWv-3IUomaimU2dg-NwnpoM,1035
|
|
23
|
-
liger_kernel/transformers/rope.py,sha256=m-ah8vZBYW8tfplTXCiAPMHJWlB1tdp_JPXJeWE-Boo,943
|
|
24
|
-
liger_kernel/transformers/swiglu.py,sha256=0-tVJ8xEYfhxnduc16PflXFj8sZPxdx9sHUn3hfwCI4,2468
|
|
25
|
-
liger_kernel/transformers/trainer_integration.py,sha256=W3ON51O5GkyzNJsItz0y5rKx-uy2f2cFfveZpqbUdhw,123
|
|
26
|
-
liger_kernel/transformers/experimental/embedding.py,sha256=HpckiAMKM8-SRxKDcGTqortVxnjhwpZsfsp9lfjqfeM,895
|
|
27
|
-
liger_kernel/transformers/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
|
-
liger_kernel/transformers/model/gemma.py,sha256=EcdkGbSj_qroTDFl0Sc_HLyDyY0xcDhwrgkM_wkXnw8,4987
|
|
29
|
-
liger_kernel/transformers/model/llama.py,sha256=6McXLi_Bt35WuxaJ_0CzEnOtayHXiPw5vjiDsaQKdJU,5323
|
|
30
|
-
liger_kernel/transformers/model/mistral.py,sha256=_MQJrDntlxBO5cJwgTjr2rk2nNd5FAXVnzcTg_PEekQ,5079
|
|
31
|
-
liger_kernel/transformers/model/mixtral.py,sha256=ZwVz7zSD2S2fyyMuJgDE4grvt2VvQL-jsZeJtdwnHFk,5750
|
|
32
|
-
liger_kernel/transformers/model/phi3.py,sha256=zmjOsVV5TjKJ0U2dCm6W-8WCx1toKoh2Wm2PZu3XOIw,4927
|
|
33
|
-
liger_kernel/transformers/model/qwen2.py,sha256=Va4uiZaVzCG2V7XKDfHjZyYTre5vPQM02j83jnnhono,4873
|
|
34
|
-
liger_kernel/transformers/model/qwen2_vl.py,sha256=UajJdi49tUOfa68i2WHQ_2GZBF7d_N_uwOntER3bsl8,6607
|
|
35
|
-
liger_kernel/triton/__init__.py,sha256=yfRe0zMb47QnqjecZWG7LnanfCTzeku7SgWRAwNVmzU,101
|
|
36
|
-
liger_kernel/triton/monkey_patch.py,sha256=5BcGKTtdqeYchypBIBopGIWPx1-cFALz7sOKoEsqXJ0,1584
|
|
37
|
-
liger_kernel-0.3.1.dist-info/LICENSE,sha256=OhzLDHJ0to4a8sodVLELZiCFylZ1NAAYLs-HrjPy0ag,1312
|
|
38
|
-
liger_kernel-0.3.1.dist-info/METADATA,sha256=fHMAk1Nur5qcuMidT0iXL5an0DIs9aG4HDFcqzD4Gms,25763
|
|
39
|
-
liger_kernel-0.3.1.dist-info/NOTICE,sha256=BXkXY9aWvEy_7MAB57zDu1z8uMYT1i1l9B6EpHuBa8s,173
|
|
40
|
-
liger_kernel-0.3.1.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
41
|
-
liger_kernel-0.3.1.dist-info/top_level.txt,sha256=2eghu4hA3LnkM7ElW92tQ8zegWKgSbeo-k-aGe1YnvY,13
|
|
42
|
-
liger_kernel-0.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|