x-transformers 2.0.0__tar.gz → 2.0.2__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. x_transformers-2.0.2/.github/FUNDING.yml +3 -0
  2. x_transformers-2.0.2/.github/workflows/python-publish.yml +36 -0
  3. x_transformers-2.0.2/.github/workflows/python-test.yaml +33 -0
  4. x_transformers-2.0.2/.gitignore +129 -0
  5. x_transformers-2.0.2/PKG-INFO +2420 -0
  6. x_transformers-2.0.2/images/all-attention.png +0 -0
  7. x_transformers-2.0.2/images/attention-on-attention.png +0 -0
  8. x_transformers-2.0.2/images/cosine-sim-attention.png +0 -0
  9. x_transformers-2.0.2/images/deepnorm.png +0 -0
  10. x_transformers-2.0.2/images/dynamic-pos-bias-linear.png +0 -0
  11. x_transformers-2.0.2/images/dynamic-pos-bias-log.png +0 -0
  12. x_transformers-2.0.2/images/dynamic-pos-bias-sinusoidal.png +0 -0
  13. x_transformers-2.0.2/images/dynamic-pos-bias.png +0 -0
  14. x_transformers-2.0.2/images/enhanced-recurrence.png +0 -0
  15. x_transformers-2.0.2/images/fcm.png +0 -0
  16. x_transformers-2.0.2/images/ffglu.png +0 -0
  17. x_transformers-2.0.2/images/flash-attention.png +0 -0
  18. x_transformers-2.0.2/images/gate_values.png +0 -0
  19. x_transformers-2.0.2/images/gating.png +0 -0
  20. x_transformers-2.0.2/images/length-extrapolation-scale.png +0 -0
  21. x_transformers-2.0.2/images/macaron-1.png +0 -0
  22. x_transformers-2.0.2/images/macaron-2.png +0 -0
  23. x_transformers-2.0.2/images/memory-transformer.png +0 -0
  24. x_transformers-2.0.2/images/normformer.png +0 -0
  25. x_transformers-2.0.2/images/pia.png +0 -0
  26. x_transformers-2.0.2/images/qknorm-analysis.png +0 -0
  27. x_transformers-2.0.2/images/resi_dual.png +0 -0
  28. x_transformers-2.0.2/images/residual_attn.png +0 -0
  29. x_transformers-2.0.2/images/rezero.png +0 -0
  30. x_transformers-2.0.2/images/rotary.png +0 -0
  31. x_transformers-2.0.2/images/sandwich-2.png +0 -0
  32. x_transformers-2.0.2/images/sandwich.png +0 -0
  33. x_transformers-2.0.2/images/sandwich_norm.png +0 -0
  34. x_transformers-2.0.2/images/scalenorm.png +0 -0
  35. x_transformers-2.0.2/images/talking-heads.png +0 -0
  36. x_transformers-2.0.2/images/topk-attention.png +0 -0
  37. x_transformers-2.0.2/images/xval.png +0 -0
  38. x_transformers-2.0.2/pyproject.toml +61 -0
  39. x_transformers-2.0.2/train_copy.py +71 -0
  40. x_transformers-2.0.2/train_enwik8.py +116 -0
  41. x_transformers-2.0.2/train_parity.py +143 -0
  42. {x_transformers-2.0.0 → x_transformers-2.0.2}/x_transformers/x_transformers.py +43 -5
  43. x_transformers-2.0.0/PKG-INFO +0 -30
  44. x_transformers-2.0.0/setup.cfg +0 -12
  45. x_transformers-2.0.0/setup.py +0 -38
  46. x_transformers-2.0.0/x_transformers.egg-info/PKG-INFO +0 -30
  47. x_transformers-2.0.0/x_transformers.egg-info/SOURCES.txt +0 -21
  48. x_transformers-2.0.0/x_transformers.egg-info/dependency_links.txt +0 -1
  49. x_transformers-2.0.0/x_transformers.egg-info/requires.txt +0 -5
  50. x_transformers-2.0.0/x_transformers.egg-info/top_level.txt +0 -1
  51. {x_transformers-2.0.0 → x_transformers-2.0.2}/LICENSE +0 -0
  52. {x_transformers-2.0.0 → x_transformers-2.0.2}/README.md +0 -0
  53. {x_transformers-2.0.0 → x_transformers-2.0.2}/tests/test_x_transformers.py +0 -0
  54. {x_transformers-2.0.0 → x_transformers-2.0.2}/x_transformers/__init__.py +0 -0
  55. {x_transformers-2.0.0 → x_transformers-2.0.2}/x_transformers/attend.py +0 -0
  56. {x_transformers-2.0.0 → x_transformers-2.0.2}/x_transformers/autoregressive_wrapper.py +0 -0
  57. {x_transformers-2.0.0 → x_transformers-2.0.2}/x_transformers/continuous.py +0 -0
  58. {x_transformers-2.0.0 → x_transformers-2.0.2}/x_transformers/dpo.py +0 -0
  59. {x_transformers-2.0.0 → x_transformers-2.0.2}/x_transformers/multi_input.py +0 -0
  60. {x_transformers-2.0.0 → x_transformers-2.0.2}/x_transformers/neo_mlp.py +0 -0
  61. {x_transformers-2.0.0 → x_transformers-2.0.2}/x_transformers/nonautoregressive_wrapper.py +0 -0
  62. {x_transformers-2.0.0 → x_transformers-2.0.2}/x_transformers/xl_autoregressive_wrapper.py +0 -0
  63. {x_transformers-2.0.0 → x_transformers-2.0.2}/x_transformers/xval.py +0 -0
@@ -0,0 +1,3 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: [lucidrains]
@@ -0,0 +1,36 @@
1
+ # This workflow will upload a Python Package using Twine when a release is created
2
+ # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3
+
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name: Upload Python Package
10
+
11
+ on:
12
+ release:
13
+ types: [published]
14
+
15
+ jobs:
16
+ deploy:
17
+
18
+ runs-on: ubuntu-latest
19
+
20
+ steps:
21
+ - uses: actions/checkout@v2
22
+ - name: Set up Python
23
+ uses: actions/setup-python@v2
24
+ with:
25
+ python-version: '3.x'
26
+ - name: Install dependencies
27
+ run: |
28
+ python -m pip install --upgrade pip
29
+ pip install build
30
+ - name: Build package
31
+ run: python -m build
32
+ - name: Publish package
33
+ uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
34
+ with:
35
+ user: __token__
36
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,33 @@
1
+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
+
4
+ name: Python package
5
+
6
+ on:
7
+ push:
8
+ branches: [ main ]
9
+ pull_request:
10
+ branches: [ main ]
11
+
12
+ jobs:
13
+ build:
14
+
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ matrix:
18
+ python-version: [3.9]
19
+
20
+ steps:
21
+ - uses: actions/checkout@v2
22
+ - name: Set up Python ${{ matrix.python-version }}
23
+ uses: actions/setup-python@v2
24
+ with:
25
+ python-version: ${{ matrix.python-version }}
26
+ - name: Install dependencies
27
+ run: |
28
+ python -m pip install --upgrade pip uv
29
+ python -m uv pip install torch==2.1.0+cpu --extra-index-url https://download.pytorch.org/whl/cpu
30
+ python -m uv pip install .[test]
31
+ - name: Test with pytest
32
+ run: |
33
+ pytest tests
@@ -0,0 +1,129 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Pyre type checker
129
+ .pyre/