added example code and readme

This commit is contained in:
Falko Victor Habel 2024-10-31 18:00:09 +01:00
parent 26ef105383
commit b85c35b720
3 changed files with 61 additions and 2 deletions

3
.gitignore vendored
View File

@ -150,6 +150,9 @@ dmypy.json
# pytype static type analyzer
.pytype/
# ml Model
fabelous-mini-embedder
# Cython debug symbols
cython_debug/

View File

@ -1,3 +1,50 @@
# fabelous-embeddings
# Fabelous Embedder Mini
This is the fabelous-embeddings model that is based on the jina-embeddings-v2-base-de Model from Jina AI.
This repository contains a custom sentence transformer model named **fabelous-mini-embedder**, trained on 13 different programming languages and English.
## Description
The model was built using the Sentence Transformer library, which provides an easy-to-use interface for working with sentence embeddings, including pre-trained models.
In addition to **fabelous-mini-embedder**, we also have a proprietary model called **fabelous-embedder-base**. They are trained on a vast dataset covering various programming languages, including:
- Python
- Java
- Go
- C++
- TypeScript
## Example Usage
Heres how to use the model to generate sentence embeddings:
```python
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("fabelous-mini-embedder")
instruction = "This is an example sentence"
embeddings = model.encode(instruction)
print(embeddings) # Output: (array of numerical embeddings)
```
The generated embeddings can be used for tasks like semantic search or classification.
## Future Improvements
We are currently working on the second generation of our model, focusing on:
- **Enhanced Multilingual Support:** Adding support for German in addition to English.
- **Expanded Dataset:** Increasing the code dataset significantly to improve model performance and accuracy.
We welcome contributions from the community to help us achieve these goals!
## Installation
To install the required libraries, run:
```bash
pip install sentence-transformers
```

9
example.py Normal file
View File

@ -0,0 +1,9 @@
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("fabelous-mini-embedder")
Instruction = "This is a example Sentence"
embeddings = model.encode(Instruction)
print(embeddings)