Liking cljdoc? Tell your friends :D
Clojure only.

embeddings.hub

Download sentence-transformers ONNX exports from the Hugging Face Hub into a local cache, for use with embeddings.core/load-model.

Download sentence-transformers ONNX exports from the Hugging Face Hub into
a local cache, for use with `embeddings.core/load-model`.
raw docstring

fetch-modelclj

(fetch-model model-id)
(fetch-model model-id opts)

Download model-id's ONNX export (onnx/model.onnx, falling back to model.onnx) and tokenizer.json from the Hugging Face Hub into a local cache, returning the model directory path for embeddings.core/load-model. Files already in the cache are not re-downloaded.

Options: :cache-dir (default ~/.cache/embeddings-clj) and :revision (default "main").

Errors are ex-info keyed :embeddings/error (:invalid-model-id, :download-failed).

Download `model-id`'s ONNX export (`onnx/model.onnx`, falling back to
`model.onnx`) and `tokenizer.json` from the Hugging Face Hub into a local
cache, returning the model directory path for
`embeddings.core/load-model`. Files already in the cache are not
re-downloaded.

Options: `:cache-dir` (default `~/.cache/embeddings-clj`) and `:revision`
(default "main").

Errors are `ex-info` keyed `:embeddings/error`
(`:invalid-model-id`, `:download-failed`).
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close