Skip to main content

fasttext.rs logo
PyPI CI

[!WARNING] This was completely AI-generated. Running on a ralph wiggum loop to see what was possible. I HAVE NOT checked the code.

fasttext.rs

A Rust-backed Python implementation of Facebook's fastText.

Installation

uv add fasttext-rs
# or
uv pip install fasttext-rs

Quick start

import fasttext_rs

# Train
model = fasttext_rs.train_supervised(input="cooking.train", epoch=25, lr=1.0, word_ngrams=2)

# Predict
labels, probs = model.predict("Which baking dish is best?")

# Vectors
vec = model.get_word_vector("hello")

# Save / Load
model.save_model("model.bin")
model = fasttext_rs.load_model("model.bin")

Performance

Benchmarked on the cooking.stackexchange dataset (12k training, 3k validation) with default parameters, single-threaded. Median of 5 runs, Apple M3 Pro.

Task fasttext (C++) fasttext.rs (Rust) Speedup
Training (5 epochs) 12.633s 6.406s 1.97x
Inference (3000 samples) 0.443s 0.218s 2.03x
Precision@1 0.1363 0.1543 —
Recall@1 0.0590 0.0703 —

Run make bench to reproduce.

Development

make           # Show all commands

Metadata

Release files for fasttext-rs 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fasttext-rs 0.2.1
File Size Uploaded
fasttext_rs-0.2.1.tar.gz 1.7 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for fasttext-rs 0.2.1
File
fasttext_rs-0.2.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl PyPy 3.10 PyPy 3.10 7.3 Linux glibc 2.17+ ARM64 Details
fasttext_rs-0.2.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl PyPy 3.9 PyPy 3.9 7.3 Linux glibc 2.17+ ARM64 Details
fasttext_rs-0.2.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
fasttext_rs-0.2.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
fasttext_rs-0.2.1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
fasttext_rs-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details
fasttext_rs-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details

Total release size: 4.1 MB

Release files / fasttext_rs-0.2.1.tar.gz

Download URL fasttext_rs-0.2.1.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
649ccd2127a8a6520caa7e8fcf7084295ab4fbbc9645ad007193e47ed10656ef
BLAKE2b-256 checksum
How to use checksums
f269f33f3017e5ba21dd9da6d6451ff0df306dda05f5d9e3d32fc2787da5d1f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 7, 2026.

Transparency log

Release files / fasttext_rs-0.2.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL fasttext_rs-0.2.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 375.6 kB
Tags Linux glibc 2.17+ ARM64 PyPy 3.10 PyPy 3.10 7.3
SHA-256 checksum
How to use checksums
fed3e51694f03c0ea789a2c91cc663ff3485be826977d3d0a5297ec7602a23ab
BLAKE2b-256 checksum
How to use checksums
a8af363778f9cf7395b80dcbe448b2481109755ca6783bd5231fbffac0e5d7b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 7, 2026.

Transparency log

Release files / fasttext_rs-0.2.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL fasttext_rs-0.2.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 379.5 kB
Tags Linux glibc 2.17+ ARM64 PyPy 3.9 PyPy 3.9 7.3
SHA-256 checksum
How to use checksums
773be53c1c5e043d1cf7674a64a029ea9b9430e93a6c7508d061ac8f88f01815
BLAKE2b-256 checksum
How to use checksums
7dcde63d271c05a4ec61ca7f465f04ede58d797fff8a08aaa9dec459ae10fcda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 7, 2026.

Transparency log

Release files / fasttext_rs-0.2.1-cp39-abi3-win_amd64.whl

Download URL fasttext_rs-0.2.1-cp39-abi3-win_amd64.whl
Size 248.7 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
d632ee8b891fa19eb927a1034d41a7aa53e8b41f073e11558ca5721f5a1d8cb3
BLAKE2b-256 checksum
How to use checksums
e39a9003393d0b75a845bc776e28c70162e1832c59417eeafd4c2879912283ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 7, 2026.

Transparency log

Release files / fasttext_rs-0.2.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL fasttext_rs-0.2.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 379.3 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
52a21bb604113f13a4ed62018c8f93f2e48b8bd2c8b5891862c8c0d4388de9b8
BLAKE2b-256 checksum
How to use checksums
0b1d25cf55b3dfca2efd09317cd3fa28ca7f14f42bfa6cab42b223e7504be93f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 7, 2026.

Transparency log

Release files / fasttext_rs-0.2.1-cp39-abi3-macosx_11_0_arm64.whl

Download URL fasttext_rs-0.2.1-cp39-abi3-macosx_11_0_arm64.whl
Size 347.9 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
28b007522ac19c35fc5796329e4e78580cec280e6fac7e1219e4f6cae689b280
BLAKE2b-256 checksum
How to use checksums
8bd4dd76ed6f329e2e4f22d7104ea8ba391ed0f9937c417d848135c3c468c9ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 7, 2026.

Transparency log

Release files / fasttext_rs-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl

Download URL fasttext_rs-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl
Size 356.7 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
a9d6abba7b17220261898edeac89a088e54d6585a4a550c929a212d22511183d
BLAKE2b-256 checksum
How to use checksums
eb3f0d46d8fb0d5a525ce9904cd236ad1a4a243996dcf21799e0ae55d46d17f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 7, 2026.

Transparency log

Release files / fasttext_rs-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL fasttext_rs-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 395.7 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
328a32eb45046af0bfd6061bc55b3f649d699cdc6c3ad528e9b1677c91ae1c89
BLAKE2b-256 checksum
How to use checksums
61702bbde42b79966f8887e3abbfdfe5b1db55dd84bfa6d0a2c26eefa202ca59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

8 release files

0.2.0

8 release files

0.1.0

8 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page