Skip to main content
Search with your own Hugging Face model
Pick an embedding model on Hugging Face and get a search over your documents that runs on it, with no serving code to write.

Deploy in Studio

Creates every resource below in your organization, with sample data.

Download the manifest

bring-your-own-model.namespace.yaml, the file Studio and the API apply.

Template page

The demo and the use case on mixpeek.com.

At a glance

How the pieces connect

Buckets hold what you upload, collections turn it into searchable documents, and retrievers answer queries over the collections.

Deploy it

1

Get the manifest

2

Validate it

Validate runs every check apply runs and creates nothing. Fix each entry in errors, then run it again.
3

Apply it

Apply creates every resource in one call. wait_for_seed=true also waits until the sample objects are processed, so the first query below has documents to return.
The response lists each resource with its outcome in resources. Apply refuses a resource that already exists and rolls the whole apply back, so to apply the file again over this namespace add ?mode=create_missing, which creates only what is missing.

Run the first query

Look up the namespace id by name, then run document-search. Check status and warnings along with documents: a run that times out still answers 200, with status degraded.

Add your own data

Each object you add to a bucket is processed by every collection that reads it. This adds one object to documents. NAMESPACE_ID is the id from the namespace lookup above.
The object is PENDING until processing finishes, then COMPLETED or FAILED. Buckets and objects covers object states, retries and duplicates.

Retrievers

Type a question or a description and get the documents whose meaning is closest, ranked by your model’s embeddings. Stages: feature_search Searches: document-embeddings

Collections

Each collection runs one extractor over a bucket, or over another collection’s documents.
Each document embedded by bge_small_hf, the Hugging Face model BAAI/bge-small-en-v1.5 that this manifest imports. Feeds document-search.Reads bucket documents with bge_small_hf v1.Inputs: text ← content

Also created

Alerts
  • document-search-returning-nothing: Emails the org notifications address (Settings -> Notifications; unset means opted out) when document-search has come back empty on its last five runs: the searches are matching no document, so the documents or their embeddings need a look.
At 10,000 items a month (2 minutes or 10 pages each) and 100,000 queries, this template costs about 20.47 USD a month (2.03 USD per 1,000 items). The namespace’s daily spend budget pauses new batches before you pass it.

The manifest

Every resource above comes from this file. Change it and apply it again with ?mode=upsert to update what exists. Manifests documents each field.
bring-your-own-model.namespace.yaml

Hand it to an agent

Paste this prompt into Claude Code, Cursor or another coding agent. To give the agent this whole page instead, use Copy page in the menu at the top of the page, or point it at the page’s Markdown at https://mixpeek.com/docs/templates/bring-your-own-model.md.
Prompt