Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add notebook on RAG #353

Merged
merged 3 commits into from
Feb 27, 2024
Merged

Add notebook on RAG #353

merged 3 commits into from
Feb 27, 2024

Conversation

nyo16
Copy link
Contributor

@nyo16 nyo16 commented Feb 27, 2024

I built a simple rag pipeline end to end with hnswlib, mistral and gte-small. I used paul graham essay text as my source.


IO.inspect(String.length(resp.body))

# Our model has dim 384 and max seq length 512.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nyo16 note that the sequence length is how many input tokens the model accepts. Each token is a couple characters, usually a word :) We get the tokens by passing the text through the tokenizer.

Copy link
Member

@jonatanklosko jonatanklosko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nyo16 thanks you, this is a great addition to the docs! I made some changes to remove some verbose outputs and I added a bit more step by step descriptions :)

@jonatanklosko jonatanklosko changed the title Simple Rag notebook. Add notebook on RAG Feb 27, 2024
@jonatanklosko jonatanklosko merged commit 22b09ac into elixir-nx:main Feb 27, 2024
2 checks passed
@nyo16
Copy link
Contributor Author

nyo16 commented Feb 27, 2024

@jonatanklosko thank you so much for the edits! I am not publish often and i am a bit rusty! Also I learned a tone from your edits how to format it for the next time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants