No project description provided
Project description
ml_dtypes
This is not an officially supported Google product.
ml_dtypes
is a stand-alone implementation of several NumPy dtype extensions used in machine learning libraries, including:
bfloat16
: an alternative to the standardfloat16
formatfloat8_*
: several experimental 8-bit floating point representations including:float8_e4m3b11
float8_e4m3fn
float8_e5m2
Installation
We will soon release pre-built wheels for this package at http://pypi.org/project/ml-dtypes, so this package can be easily pip installed.
To build locally, clone the repository and run:
$ git submodule init
$ git submodule update
$ pip install .
Example Usage
>>> from ml_dtypes import bfloat16
>>> import numpy as np
>>> np.zeros(4, dtype=bfloat16)
array([0, 0, 0, 0], dtype=bfloat16)
Importing ml_dtypes
also registers the data types with numpy, so that they may
be referred to by their string name:
>>> np.dtype('bfloat16')
dtype(bfloat16)
>>> np.dtype('float8_e5m2')
dtype(float8_e5m2)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ml_dtypes-0.0.2rc5.tar.gz
(683.1 kB
view hashes)
Built Distributions
Close
Hashes for ml_dtypes-0.0.2rc5-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c3b5e28a4ce2e2474dc42778c6edc77037443e552d388c25309066babc62e3d |
|
MD5 | 7e5d9ebd7fde623761a885447b7020c0 |
|
BLAKE2b-256 | 5c9cda32a83348e16405623f5aefbd8779e6b2bfef3fb63fce304ab2f747ddc9 |
Close
Hashes for ml_dtypes-0.0.2rc5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71acd6cad9e7f3de19141617ca7e7f2b35d4667e926742896c94db3374c6881f |
|
MD5 | 5cc15dbefc09331795d076e517308ffd |
|
BLAKE2b-256 | 699a53605c376f2c376604ab911033936ef357bdeb7d8451e9908b9bcbc5f77b |
Close
Hashes for ml_dtypes-0.0.2rc5-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72574c6303d84aae85df708ffd6057388eb98e26829bfd7539d20fc1ab7d96c3 |
|
MD5 | f8444195ffef84af3c006ce876b7c9fc |
|
BLAKE2b-256 | 6f8353f06a3c06cfbd9fb4cfaf2dd34a943a501392a58a1cfeac0b036b003013 |
Close
Hashes for ml_dtypes-0.0.2rc5-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b312303ca604f4d1a627c28e0914501cad0dbf7be0c456aac44c3c803acfa9a3 |
|
MD5 | 7d16744807cd4a3747441c99e149513b |
|
BLAKE2b-256 | 21f1e280fc0b6f9177ccafddd9c58573a960216da8936667f59ba7cf2d245394 |
Close
Hashes for ml_dtypes-0.0.2rc5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd25c5308f265a46711249db17a1a3730f40820157b96bd9e282de6a49dd8817 |
|
MD5 | fbe0224aa03e740d8ab3baa791ff7aa4 |
|
BLAKE2b-256 | 1c301514a8d1fd8796d7f28de70b0ed766569bcc4f5393bbb4a6a994d6cd8bfa |
Close
Hashes for ml_dtypes-0.0.2rc5-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71b3ff181841a018b7613bf040540cf012479fa2e3824d70077615fd7ca9cf53 |
|
MD5 | 62bf80d92be8dc694b6a887d28eaa911 |
|
BLAKE2b-256 | f0edbe1f7b5a3b851643b577b3174b28ffad363375b37e4648c036c9f2ecc069 |
Close
Hashes for ml_dtypes-0.0.2rc5-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd3aa555c84f02210431da2cc41a3111ea4028c76f7c929178299cf4d4600870 |
|
MD5 | 47626bfc6c57a32a67e15c70b69868be |
|
BLAKE2b-256 | 14c562ed6d2ead82aa5b1ef748de46f687a6591208d72e9fadbf836c3c547692 |
Close
Hashes for ml_dtypes-0.0.2rc5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e22d6aadabad0128c98db40dfcad03399a5c3d2a5579cd53f2b8f097479204d |
|
MD5 | 80eedc4838490b49c5b54ebd435f8570 |
|
BLAKE2b-256 | b3e41e0f4818b6a0716338fe59c050157cc07c2500bc5c5b38e40fd407c1888d |
Close
Hashes for ml_dtypes-0.0.2rc5-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e22c850f22fe1b754e928c369f6d659fb2f69c6c17427705956d6c2c2bb82f9e |
|
MD5 | f54ad75c24c922ac8d93213a73e7a910 |
|
BLAKE2b-256 | e22f87f57e54418305251ed5492b40f9499e45e6a58caef2ffad67ae795d1342 |
Close
Hashes for ml_dtypes-0.0.2rc5-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97d8645cb40235178aa5731046b34218005be7751069231ec40d8d59512b06a3 |
|
MD5 | 1b3837a499097830066c8ab734da6662 |
|
BLAKE2b-256 | a73f65ad400601bb8a3ae370c0c60cd99eb8732a54398d6b4b54d37fdd04eddd |
Close
Hashes for ml_dtypes-0.0.2rc5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ba8f38e321d712f8d6d086334aab10372dcd18f90ad941c14c517f4a08613a5 |
|
MD5 | 0b8aca7405682a5f71e52d6c197f1f96 |
|
BLAKE2b-256 | b63390f1505996625d10741137fa4caee61fec19396096b7297b24e11ab9d126 |
Close
Hashes for ml_dtypes-0.0.2rc5-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07ef8d27b68e8270e1e8565a9d6288c2ba6e5f245366456fccc72ae1c89e7f55 |
|
MD5 | 016d821d387c399759fc21e523d6bdab |
|
BLAKE2b-256 | 07a1bc70b41a3e990085cb6d278bf505a3ada91ea162d9e87711ce5a93d0a36e |