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

Update ollama-chat.adoc #2644

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

shahbazaamir
Copy link
Contributor

@shahbazaamir shahbazaamir commented Apr 5, 2025

  • Updated Docs , added command to view the available models in Ollama
  • Improved the response time of Integration test by skipping the delete of additional models , this step is controlled by the environment variable PERSIST_MODELS , set it as true if you want to avoid deleting and downloading of models like tinyllama. This will help in reducing the overall development and testing time for consecutive runs with minor modifications to the Test class.
export PERSIST_MODELS=true

For example, the first run takes 01:24 min , since the model has to downloaded , the following runs will take 4.088 s.
image

image

  • Added Test cases to compare the similarity of the embeddings , similar items will have higher the cosine similarity when compared to non similar items
Keywords Comparison Cosine Similarity from Embeddings Comments
apple vs apple 1 Identical
apple vs banana 0.4239149097769852 More similar compared to others
apple vs orange 0.37267152451937946 Similar
apple vs train 0.19252728099555297 Least Similar
apple vs bus 0.21013765197467324 Less similar
apple vs taxi 0.2941340746684272 Less similar
train vs apple 0.19252728099555297 Least Similar
train vs banana 0.2739046533048044 Less similar
train vs orange 0.2620855357953212 Less similar
train vs train 1 Identical
train vs bus 0.4741106221306781 More similar compared to others
train vs taxi 0.4731519375526629 Similar

Thank you for taking time to contribute this pull request!
You might have already read the [contributor guide][1], but as a reminder, please make sure to:

  • Sign the contributor license agreement
  • Rebase your changes on the latest main branch and squash your commits
  • Add/Update unit tests as needed
  • Run a build and make sure all tests pass prior to submission

Signed-off-by: Shahbaz Aamir <[email protected]>
 Added environment variable to support persisting of models to improv…
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.

1 participant