---
title: gte-base
canonical_url: "https://www.modelscope.cn/models/Xorbits/gte-base"
md_url: "https://www.modelscope.cn/models/Xorbits/gte-base.md"
repository: Xorbits/gte-base
last_updated: 2023-10-19
license: "Apache License 2.0"
model_type:
  - bert
architectures:
  - BertModel
library_name:
  - onnx
  - xinference
frameworks:
  - xinference
inference_backends:
  - "deploy_task emb"
  - "sglang 0.5.2"
  - "vllm 0.9.2"
downloads: 291
stars: 0
---

# gte-base

> gte-base - Xorbits 在 ModelScope 开源的模型。This repo contains embedding model files for gte-base.

Xorbits/gte-base 是 ModelScope 魔搭社区上的机器学习模型，采用 Apache License 2.0 许可，可用 deploy_task emb、sglang 0.5.2、vllm 0.9.2 部署。

- **Repository**: Xorbits/gte-base
- **License**: Apache License 2.0
- **Inference backends**: deploy_task emb, sglang 0.5.2, vllm 0.9.2
- **Downloads**: 291
- **Stars**: 0
- **Last updated**: 2023-10-19

Source: https://www.modelscope.cn/models/Xorbits/gte-base

---

## gte-base

This repo contains embedding model files for gte-base.

FlagEmbedding can map any text to a low-dimensional dense vector 
which can be used for tasks like retrieval, classification, clustering, or semantic search. 
And it also can be used in vector databases for LLMs.

## Information
- dimensions: 768
- max_tokens: 512
- language: en

## Usage

###  Start a local instance of Xinference
```bash
xinference -p 9997
```

### Launch and inference
```python
from xinference.client import Client

client = Client("http://localhost:9997")
model_uid = client.launch_model(model_name="gte-base", model_type="embedding")
model = client.get_model(model_uid)

model.create_embedding("write a poem.")
```
