infinity icon indicating copy to clipboard operation
infinity copied to clipboard

Support `--dimensions` parameter in CLI

Open persiyanov opened this issue 9 months ago • 1 comments

Description

Hi there!

First off – thank you for infinity, it's a fantastic project that allows setting up OpenAI-compatible API quickly.

I was integrating it with Typesense, which recently introduced semantic search capabilities. However, I'm using Matryoshka embeddings, and Typesense doesn't support customizing the OpenAI-server request.

Hence, I had to update the infinity CLI to support setting a default value for matryoshka_dim when the server starts.

The way you can run it is:

infinity_emb v2 --model-id /me/snowflake-arctic-embed-m-v2.0 --dimensions 256 --device cpu

I'm not sure if this aligns with the roadmap of the project, but I figured I'd submit a PR anyway if others find it helpful.

Checklist

  • [x] I have read the CONTRIBUTING guidelines.
  • [x] I have added tests to cover my changes.
  • [x] I have updated the documentation (docs folder) accordingly.

persiyanov avatar Apr 07 '25 17:04 persiyanov

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 79.83%. Comparing base (88bad14) to head (e9fdf0d).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #564      +/-   ##
==========================================
- Coverage   79.85%   79.83%   -0.02%     
==========================================
  Files          43       43              
  Lines        3489     3497       +8     
==========================================
+ Hits         2786     2792       +6     
- Misses        703      705       +2     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov-commenter avatar Apr 15 '25 02:04 codecov-commenter