Skip to content

Commit

Permalink
* docs(index.md): update documentation to reflect changes in FastEmbe…
Browse files Browse the repository at this point in the history
…d library
  • Loading branch information
NirantK committed Aug 21, 2023
1 parent c8c4d21 commit 88d92ff
Showing 1 changed file with 39 additions and 12 deletions.
51 changes: 39 additions & 12 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,44 @@
# Welcome to MkDocs
# FastEmbed

For full documentation visit [mkdocs.org](https://www.mkdocs.org).
# 🪶 What is FastEmbed?

## Commands
FastEmbed is lightweight, fast, Python library built for retrieval and easy to use.

* `mkdocs new [dir-name]` - Create a new project.
* `mkdocs serve` - Start the live-reloading docs server.
* `mkdocs build` - Build the documentation site.
* `mkdocs -h` - Print help message and exit.

## Project layout
## 🚀 Installation

mkdocs.yml # The configuration file.
docs/
index.md # The documentation homepage.
... # Other markdown pages, images and other files.
To install the FastEmbed library, we recommend using Poetry, alternatively -- pip works:

```bash
pip install fastembed
```

## 📖 Usage

```python
from fastembed.embedding import DefaultEmbedding

documents: List[str] = [
"Hello, World!",
"This is an example document.",
"fastembed is supported by and maintained by Qdrant." * 128,
]
embedding_model = DeafultEmbedding()
embeddings: List[np.ndarray] = list(embedding_model.encode(documents))
```

## 🚒 Under the hood

### Why fast?

It's important we justify the "fast" in FastEmbed. FastEmbed is fast because:

1. Quantized model weights
2. ONNX Runtime which allows for inference on CPU, GPU, and other dedicated runtimes

### Why light?
1. No hidden dependencies on PyTorch or TensorFlow via Huggingface Transformers

### Why accurate?
1. Better than OpenAI Ada-002
2. Top of the Embedding leaderboards e.g. [MTEB](https://huggingface.co/spaces/mteb/leaderboard)

0 comments on commit 88d92ff

Please sign in to comment.