---
title: bge-m3
canonical_url: "https://www.modelscope.cn/models/Ceceliachenen/bge-m3"
md_url: "https://www.modelscope.cn/models/Ceceliachenen/bge-m3.md"
repository: Ceceliachenen/bge-m3
last_updated: 2024-07-11
license: "Apache License 2.0"
model_type:
  - xlm-roberta
architectures:
  - XLMRobertaModel
parameters: 567.8M
tensor_type:
  - F32
library_name:
  - safetensors
  - xinference
frameworks:
  - xinference
inference_backends:
  - "deploy_task emb"
  - "sglang 0.5.2"
  - "vllm 0.9.2"
downloads: 2979
stars: 1
---

# bge-m3

> bge-m3 - Ceceliachenen 在 ModelScope 开源的模型。This repo is a mirror of embedding model bge-m3.

Ceceliachenen/bge-m3 是 ModelScope 魔搭社区上的 567.8M 参数机器学习模型，采用 Apache License 2.0 许可，可用 deploy_task emb、sglang 0.5.2、vllm 0.9.2 部署。

- **Repository**: Ceceliachenen/bge-m3
- **License**: Apache License 2.0
- **Parameters**: 567.8M
- **Inference backends**: deploy_task emb, sglang 0.5.2, vllm 0.9.2
- **Downloads**: 2979
- **Stars**: 1
- **Last updated**: 2024-07-11

Source: https://www.modelscope.cn/models/Ceceliachenen/bge-m3

---

## bge-m3

This repo is a mirror of embedding model bge-m3.

## Information
- dimensions: 1024
- max_tokens: 8192
- language: zh, en

## Example code

### Install packages
```bash
pip install xinference[ggml]>=0.4.3
```
If you want to run with GPU acceleration, refer to [installation](https://github.com/xorbitsai/inference#installation).

###  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="bge-m3",
    model_type="embedding"
    )
model = client.get_model(model_uid)

input_text = "What is the capital of China?"
model.create_embedding(input_text)
```

### More information

[Xinference](https://github.com/xorbitsai/inference) Replace OpenAI GPT with another LLM in your app 
by changing a single line of code. Xinference gives you the freedom to use any LLM you need. 
With Xinference, you are empowered to run inference with any open-source language models, 
speech recognition models, and multimodal models, whether in the cloud, on-premises, or even on your laptop.

<i><a href="https://join.slack.com/t/xorbitsio/shared_invite/zt-1z3zsm9ep-87yI9YZ_B79HLB2ccTq4WA">👉 Join our Slack community!</a></i>
