Skip to main content

Fast, dependency-free text embeddings (BAAI/bge-small-en-v1.5) in pure C

Project description

fasttextembed (Python)

Fast, dependency-free text embeddings for BAAI/bge-small-en-v1.5, powered by a small pure-C engine (no PyTorch, no ONNX Runtime). The model (~64 MB) is downloaded and cached on first use.

pip install fasttextembed
from fasttextembed import TextEmbedding

model = TextEmbedding()                          # downloads + caches the model on first call
vectors = model.embed(["hello world", "fast"])   # list of 384-float vectors
one = model.embed_one("hello world")
  • embed(texts, threads=0) — batch; threads<=0 uses all cores.
  • Returns plain list[list[float]] (wrap with numpy.asarray(...) if you want an array).

Environment overrides: FTE_MODEL_DIR (use local model.fte/vocab.tsv), FTE_MODEL_URL (download base URL), FTE_CACHE (cache dir), FTE_LIB (path to the C shared library).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fasttextembed-1.0.0.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fasttextembed-1.0.0-cp311-cp311-macosx_15_0_arm64.whl (18.9 kB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

File details

Details for the file fasttextembed-1.0.0.tar.gz.

File metadata

  • Download URL: fasttextembed-1.0.0.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for fasttextembed-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a8bece6220fc2bdba98d42437909272469527fb4abdc79ba1e29e204715c23e9
MD5 ffa2ca754672eb87a3b05ba8fde7556b
BLAKE2b-256 1058dd0ab61faa62f3e23168a04067bd4f5233ca2a512d5c4a9e8494b737c58b

See more details on using hashes here.

File details

Details for the file fasttextembed-1.0.0-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for fasttextembed-1.0.0-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 8a4f8cba7687e8165d5476970a02b45686b3951f1d604803070bcb7526664279
MD5 00325f4ab1bcf6c5624fc982557a0238
BLAKE2b-256 60db1002e236134165957cf261afad458be6b0168135d7c10f226e73e8d435b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page