semvec/pypi-packages huggingface dataset:
edkrule 1.0.0.7
e5 规则引擎
Requires Python: >=3.9

支持解析e5的规则表达式
# Release 1.0.0.0
1. 初发布
# Release 1.0.0.1
1. 集成了一些功能函数方便使用
2. 新增 Result 方便 查看执行结果和跟踪执行结果
# Release 1.0.0.2
1. 增加了 HTML 导出规则树
# Release 1.0.0.3
1. 增加了 HTML 导出模板
# Release 1.0.0.4
1. 修复了三元表达式问题
# Release 1.0.0.5
1. 返回的图形数据，增加了表达式类型和节点类型
# Release 1.0.0.6
1. 修复3元表达式的条件表达式被拆散的问题
# Release 1.0.0.7
1.修复三元表达式和括号表达式多嵌套一层的问题
simplepe 0.0.3
A simple simplepe for positional encoding
Keywords: artificial intelligence, deep learning, positional embedding

# SimplePE

Simple implementation of some Positional Encoding methods in PyTorch.

- [x] Sinusoidal Positional Encoding
- [x] Rotary Positional Encoding

## Installation

```bash
git clone https://github.com/donglinkang2021/simplepe.git
cd simplepe
pip install .
```

## Usage

```python
python example.py # pe value
python example2.py # attention score
```

You can see the following results:

| Method | Sinusoidal | Rotary |
| ------------ | ---------- | ------ |
| Dimension-Time_Step Heatmap | ![Sinusoidal](./images/Sinusoidal_Positional_Encoding_Heatmap.png) | ![Rotary](./images/Rotary_Positional_Encoding_Heatmap.png) |
| Value-Time_Step Line_Plot | ![Sinusoidal](./images/Sinusoidal_Positional_Encoding_LinePlot.png) | ![Rotary](./images/Rotary_Positional_Encoding_LinePlot.png) |
| Multi-Head Dimension-Time_Step Heatmap | ![Sinusoidal](./images/Multi-Head_Sinusoidal_Positional_Encoding_Heatmap.png) | ![Rotary](./images/Multi-Head_Rotary_Positional_Encoding_Heatmap.png) |
| Multi-Head Value-Time_Step Line_Plot | ![Sinusoidal](./images/Multi-Head_Sinusoidal_Positional_Encoding_LinePlot.png) | ![Rotary](./images/Multi-Head_Rotary_Positional_Encoding_LinePlot.png) |

| Method\Time_Step-Time_Step Heatmap | T=2048, D=32 | T=2048, D=64 | T=4096, D=512 |
| ------------ | ---------- | ------ | ------ |
| Sinusoidal | ![Sinusoidal](./images/Sinusoidal_Positional_Encoding_dim=32_Attention_Score_Heatmap.png) | ![Sinusoidal](./images/Sinusoidal_Positional_Encoding_dim=64_Attention_Score_Heatmap.png) | ![Sinusoidal](./images/Sinusoidal_Positional_Encoding_dim=512_Attention_Score_Heatmap.png) |
| Rotary | ![Rotary](./images/Rotary_Positional_Encoding_dim=32_Attention_Score_Heatmap.png) | ![Rotary](./images/Rotary_Positional_Encoding_dim=64_Attention_Score_Heatmap.png) | ![Rotary](./images/Rotary_Positional_Encoding_dim=512_Attention_Score_Heatmap.png) |

| Method\Attention_Score-Time_Step Line_Plot | T=2048, D=32 | T=2048, D=64 | T=4096, D=512 |
| ------------ | ---------- | ------ | ------ |
| Sinusoidal | ![Sinusoidal](./images/Sinusoidal_Positional_Encoding_dim=32_Attention_Score_LinePlot.png) | ![Sinusoidal](./images/Sinusoidal_Positional_Encoding_dim=64_Attention_Score_LinePlot.png) | ![Sinusoidal](./images/Sinusoidal_Positional_Encoding_dim=512_Attention_Score_LinePlot.png) |
| Rotary | ![Rotary](./images/Rotary_Positional_Encoding_dim=32_Attention_Score_LinePlot.png) | ![Rotary](./images/Rotary_Positional_Encoding_dim=64_Attention_Score_LinePlot.png) | ![Rotary](./images/Rotary_Positional_Encoding_dim=512_Attention_Score_LinePlot.png) |