Re:Jina AI Launches First Open-Source 8K Text Embedding, Riv...
by X6S1x6Okd1st on Wednesday October 25, 2023 @09:36PM
(#38020674)
Thank you so much for all the work you've put into llm!
Re:Jina AI Launches First Open-Source 8K Text Embedding, Riv...
by dazzaji on Wednesday October 25, 2023 @10:21PM
(#38020939)
Excellent! And you were just saying how risky it is to rely long-term on OpenAI text embeddings in your post on the topic. The timing for this open source option worked out nicely.
Re:Jina AI Launches First Open-Source 8K Text Embedding, Riv...
by bosky101 on Wednesday October 25, 2023 @11:18PM
(#38021264)
The only feedback I had from your embedding post was
wish we could create the array of floating points without openai
Great timely turnaround time, good sir. Ht
Re:Jina AI Launches First Open-Source 8K Text Embedding, Riv...
by simonw on Wednesday October 25, 2023 @11:56PM
(#38021434)
Wrote this up on my blog: https://simonwillison.net/2023/Oct/26/llm-embed-jina/
Re:Jina AI Launches First Open-Source 8K Text Embedding, Riv...
by mike_ivanov on Thursday October 26, 2023 @01:55AM
(#38022125)
JFYI, this is what happens on my M1 Macbook:
$ brew install llm $ llm ModuleNotFoundError: No module named 'typing_extensions'
Not sure where to report it.
Re:Jina AI Launches First Open-Source 8K Text Embedding, Riv...
by simonw on Thursday October 26, 2023 @02:15AM
(#38022287)
Whoa, that is a weird one. Do you know what version of Python you have from Homebrew?
It looks like that package is correctly listed in the formula: https://github.com/Homebrew/homebrew-core/blob/a0048881ba9a2...
Re:Jina AI Launches First Open-Source 8K Text Embedding, Riv...
by mike_ivanov on Thursday October 26, 2023 @12:07PM
(#38027590)
% python3 --version
Python 3.11.6
% which python3
/opt/homebrew/bin/python3
% brew info python-typing-extensions
==> python-typing-extensions: stable 4.8.0 (bottled)
Re:Jina AI Launches First Open-Source 8K Text Embedding, Riv...
by IanCal on Thursday October 26, 2023 @05:42AM
(#38023573)
Probably not this, but check with `which llm` what that's running. I had weird issues not matching the documentation but just had some other random python cli tool called llm I'd put in my home bin for and forgotten about it.
Re:Jina AI Launches First Open-Source 8K Text Embedding, Riv...
by mike_ivanov on Thursday October 26, 2023 @12:08PM
(#38027597)
% which llm
/opt/homebrew/bin/llm
Re:Jina AI Launches First Open-Source 8K Text Embedding, Riv...
by jillesvangurp on Thursday October 26, 2023 @07:09AM
(#38024037)
Thanks, this is wonderfully simple to use. Just managed to package this up using docker and was able to use it without a lot of drama. Nice how simple this is to use.
I've dabbled a bit with elasticsearch dense vectors before and this model should work great for that. Basically, I just need to feed it a lot of content and add the vectors and vector search should work great.
Re:Jina AI Launches First Open-Source 8K Text Embedding, Riv...
by michalmatczuk on Thursday October 26, 2023 @07:28AM
(#38024154)
FYI it seems that llm install llm-embed-jina is missing yaml dependency
File "/opt/homebrew/Cellar/llm/0.11_1/libexec/lib/python3.12/site-packages/llm/default_plugins/openai_models.py", line 17, in <module>
import yaml
ModuleNotFoundError: No module named 'yaml'
Re:Jina AI Launches First Open-Source 8K Text Embedding, Riv...
by simonw on Thursday October 26, 2023 @09:28AM
(#38025231)
Thanks! I wonder if the Python 3.12 upgrade broke something.
The pyyaml package is correctly listed on the formula page though: https://formulae.brew.sh/formula/llm
Here's how to try it out.
First, install LLM. Use pip or pipx or brew:
Next install the new plugin: You can confirm the new models are now available to LLM by running: You should see a list that includes "jina-embeddings-v2-small-en" and "jina-embeddings-v2-base-en"To embed a string using the small model, run this:
That will output a JSON array of 512 floating point numbers (see my explainer here for what those are: https://simonwillison.net/2023/Oct/23/embeddings/#what-are-e...)Embeddings are only really interesting if you store them and use them for comparisons.
Here's how to use the "llm embed-multi" command to create embeddings for the 30 most recent issues in my LLM GitHub repository:
This creates a collection called "jina-llm-issues" in a default SQLite database on your machine (the path to that can be found using "llm collections path").To search for issues in that collection with titles most similar to the term "bug":
Or for issues most similar to another existing issue by ID: Full documentation on what you can do with LLM and embeddings here: https://llm.datasette.io/en/stable/embeddings/index.htmlAlternative recipe - this creates embeddings for every single README.md in the current directory and its subdirectories. Run this somewhere with a node_modules folder and you should get a whole lot of interesting stuff:
Then search them like this: