Quantize embedding (#994)

* quantize embedding

* rename as_linear + comment

* consistency in docs

* fix test
This commit is contained in:
Awni Hannun
2024-04-15 16:42:10 -07:00
committed by GitHub
parent 2e7c02d5cd
commit cd9e184529
9 changed files with 269 additions and 54 deletions

View File

@@ -0,0 +1,20 @@
{{ fullname | escape | underline}}
.. currentmodule:: {{ module }}
.. autoclass:: {{ objname }}
{% block methods %}
{% if methods %}
.. rubric:: {{ _('Methods') }}
.. autosummary::
{% for item in methods %}
{%- if item not in inherited_members and item != "__init__" %}
~{{ name }}.{{ item }}
{%- endif %}
{%- endfor %}
{% endif %}
{% endblock %}

View File

@@ -173,6 +173,7 @@ In detail:
:toctree: _autosummary
value_and_grad
quantize
.. toctree::

View File

@@ -31,6 +31,7 @@ Layers
Mish
MultiHeadAttention
PReLU
QuantizedEmbedding
QuantizedLinear
RMSNorm
ReLU
@@ -43,4 +44,4 @@ Layers
Softshrink
Step
Transformer
Upsample
Upsample

View File

@@ -19,3 +19,4 @@ return python trees will be using the default python ``dict``, ``list`` and
tree_flatten
tree_unflatten
tree_map
tree_map_with_path