BA

BAAI/bge-m3

sentence-similaritysentence-transformersmit570M params · updated Jul 2024

Usage

usage.pytemplate from repo id
from osai import AutoModelForCausalLM, AutoTokenizer

repo = "BAAI/bge-m3"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(
    repo, dtype="bfloat16", device_map="auto",
)

msgs = [{"role": "user", "content": "Explain speculative decoding."}]
ids = tok.apply_chat_template(msgs, return_tensors="pt").to(model.device)
print(tok.decode(model.generate(ids, max_new_tokens=256)[0]))

Hardware

Computed from 0.57B parameters × bytes per parameter, plus 20% for activations and KV cache. Not measured.

PrecisionWeightsEstimated VRAMFits on
bf161.1 GB1.3 GBCPU or T4 16 GB
int8541 MB0.6 GBCPU or T4 16 GB
nf4271 MB0.3 GBCPU or T4 16 GB