Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/patw/instructorvec
Create dense vectors using the instructor-large model, running on CPU in quantized mode (fast!)
https://github.com/patw/instructorvec
instructor-embeddings vector-database vectorization
Last synced: 29 days ago
JSON representation
Create dense vectors using the instructor-large model, running on CPU in quantized mode (fast!)
- Host: GitHub
- URL: https://github.com/patw/instructorvec
- Owner: patw
- License: mit
- Created: 2024-01-04T02:41:50.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-02-21T01:58:00.000Z (10 months ago)
- Last Synced: 2024-05-07T18:23:06.747Z (8 months ago)
- Topics: instructor-embeddings, vector-database, vectorization
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# InstructorVec
A small vector API service for generating quantized instructor-large vectors. This is used in various other projects under my github repos
## Local Installation
```
pip install -r requirements.txt
```or
```
pip3 install -r requirements.txt
```## Local Running
```
uvicorn main:app --host 0.0.0.0 --port 3005
```or using `python3`
```
python3 -m uvicorn main:app --host 0.0.0.0 --port 3005
```**Warning**: The first run will be VERY slow to load
Visit `http://localhost:3005/docs` in a browser once it's loaded
Call it in python like this:
```
# Function to call the text embedder
def embed(text):
response = requests.get(embedder["embedding_endpoint"], params={"text":text, "instruction": "Represent this text for retrieval:" }, headers={"accept": "application/json"})
vector_embedding = response.json()
return vector_embedding
```