Skip to content

feat: added support for modernbert embeddings #9

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

Merged
merged 2 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ repos:
- id: mypy
additional_dependencies: [types-tabulate, types-docutils]
args: [--ignore-missing-imports, --check-untyped-defs]
- repo: local
hooks:
- id: pytest
name: pytest
stages: [pre-commit]
types: [python]
entry: make test
language: system
pass_filenames: false
# always_run: true
#- repo: local
# hooks:
# - id: pytest
# name: pytest
# stages: [pre-commit]
# types: [python]
# entry: make test
# language: system
# pass_filenames: false
# # always_run: true
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,21 @@ Example benchmark output:
└────────────────┴────────────┴───────────┴───────────┴──────────────────┘
```

### Embeddings

The indexer supports different embedding models for semantic search:

```bash
# Use ModernBERT embeddings (recommended)
gptme-rag index *.md --embedding-function modernbert
```

Features:
- 🚀 ModernBERT embeddings (8192 token context)
- 📊 Better performance on code and technical content
- ~~⚡ Flash Attention 2 support for faster processing~~
- 🔄 ~~Automatic fallback to CPU if CUDA unavailable~~

### Document Chunking

The indexer supports automatic document chunking for efficient processing of large files:
Expand Down
Loading
Loading