Create embeddings using the Nomic API
Project description
llm-nomic-api-embed
Create embeddings using the Nomic API
Installation
Install this plugin in the same environment as LLM.
llm install llm-nomic-api-embed
Usage
This plugin requires a Nomic API key. These include a generous free allowance for their embedding API.
Configure the key like this:
llm keys set nomic
# Paste key here
You can then use the Nomic embedding models like this:
llm embed -m nomic-1.5 -c 'hello world'
This will return a 768 item floating point array as JSON.
See the LLM embeddings documentation for more you can do with the tool.
Models
Run llm embed-models
for a full list. The Nomic models are:
nomic-embed-text-v1 (aliases: nomic-1)
nomic-embed-text-v1.5 (aliases: nomic-1.5)
nomic-embed-text-v1.5-512 (aliases: nomic-1.5-512)
nomic-embed-text-v1.5-256 (aliases: nomic-1.5-256)
nomic-embed-text-v1.5-128 (aliases: nomic-1.5-128)
nomic-embed-text-v1.5-64 (aliases: nomic-1.5-64)
nomic-embed-vision-v1
nomic-embed-vision-v1.5
nomic-embed-combined-v1
nomic-embed-combined-v1.5
Vision models can be used with image files using the --binary
option, for example:
llm embed-multi images --files . '*.png' \
--binary --model nomic-embed-vision-v1.5
Combined vision and text models
The nomic-embed-combined-v1
and nomic-embed-combined-v1.5
models are special - they will automatically use their respective text models for text inputs and their respective vision models for images.
This means you can use them to create a collection that mixes images and text, or you can create an image collection with them and then use text to find similar images.
Here's how do do that for a photos/
directory full of JPEGs:
llm embed-multi --binary -m nomic-embed-combined-v1.5 \
-d photos.db photos --files photos/ '*.jpeg'
Then run similarity searches like this:
llm similar photos -d photos.db -c pelican
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd llm-nomic-api-embed
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
llm install -e '.[test]'
To run the tests:
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file llm_nomic_api_embed-0.3.tar.gz
.
File metadata
- Download URL: llm_nomic_api_embed-0.3.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96729b3fbcfbc925b62208d55d38ca7850063cb96a81911ee0a73b21aff8699b |
|
MD5 | c5ad1986fb24a589265d28084c212634 |
|
BLAKE2b-256 | 73aaa39f0dde114ad184c841ddfee26a2ab387b4cae162a5bc46a67ae1080391 |
Provenance
The following attestation bundles were made for llm_nomic_api_embed-0.3.tar.gz
:
Publisher:
publish.yml
on simonw/llm-nomic-api-embed
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
llm_nomic_api_embed-0.3.tar.gz
- Subject digest:
96729b3fbcfbc925b62208d55d38ca7850063cb96a81911ee0a73b21aff8699b
- Sigstore transparency entry: 150639757
- Sigstore integration time:
- Predicate type:
File details
Details for the file llm_nomic_api_embed-0.3-py3-none-any.whl
.
File metadata
- Download URL: llm_nomic_api_embed-0.3-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7046739761cfb4058e3fcc19acf56612ff71631dde5cd774377ba298495a05f |
|
MD5 | 82844411a3cb0472e0915183a025acbf |
|
BLAKE2b-256 | 2af6309ac014bc8812956d5275941a73a29d33ed4fb2385183bd954a1dcacbe9 |
Provenance
The following attestation bundles were made for llm_nomic_api_embed-0.3-py3-none-any.whl
:
Publisher:
publish.yml
on simonw/llm-nomic-api-embed
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
llm_nomic_api_embed-0.3-py3-none-any.whl
- Subject digest:
c7046739761cfb4058e3fcc19acf56612ff71631dde5cd774377ba298495a05f
- Sigstore transparency entry: 150639758
- Sigstore integration time:
- Predicate type: