Skip to main content

Local bge-small-en-v1.5 embeddings, bundled offline, no Hugging Face runtime dependency.

Project description

chapek-embedder

Local bge-small-en-v1.5 embeddings, bundled offline, no Hugging Face runtime dependency.

Install

pip install chapek-embedder

Usage

from chapek_embedder import embed, MODEL_VERSION

vectors = embed(["text one", "text two"])
print(vectors.shape)  # (2, 384)
print(MODEL_VERSION)  # bge-small-en-v1.5-cls

Output

  • numpy.ndarray of shape (n, 384)
  • dtype is float32
  • CLS pooled from the model's last hidden state
  • L2-normalized per vector
  • Inputs longer than 512 tokens are truncated cleanly

Compatibility

This package is designed to match Cloudflare Workers AI's @cf/baai/bge-small-en-v1.5 with pooling set to "cls".

Development

Before building a wheel, download the bundled model resources:

python scripts/download_model.py

Then install for development:

pip install -e .

Run tests with:

pytest

Model version and license

  • Model version: bge-small-en-v1.5-cls
  • License: MIT (BAAI weights/license)

Project

This package is part of the Chapek project (chapek.ai) and is published separately so it can be reused in constrained environments.

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

chapek_embedder-0.1.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

chapek_embedder-0.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file chapek_embedder-0.1.0.tar.gz.

File metadata

  • Download URL: chapek_embedder-0.1.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for chapek_embedder-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ea7cf7addc63e58d10a7a9ab06327dc4e2c6487e9cb0a94d63b115f86d84f22b
MD5 127420cd7944999eb859791f3633f2dc
BLAKE2b-256 3af6d9a126e9538fad33628b23ef17ab04f520bef02951b7b38383ebac7309f0

See more details on using hashes here.

File details

Details for the file chapek_embedder-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for chapek_embedder-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee58bf78d17645a2bb458a34707b93c1bd114c0bf4e5b14521b09627a55c4cfe
MD5 a61d489e7f2ee7bdbf6e09e3eda27b3f
BLAKE2b-256 232d46875a511eb6c925b4f9b630839c33f8074fe5a45c7175b74d08cfd69f10

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