Logo
Explore Help
Sign In
discourse/discourse-ai
1
0
Fork 0
You've already forked discourse-ai
mirror of https://github.com/discourse/discourse-ai.git synced 2025-07-01 03:52:34 +00:00
Code Issues Packages Projects Releases Wiki Activity
discourse-ai/lib/tokenizer/bge_m3_tokenizer.rb

12 lines
258 B
Ruby
Raw Permalink Normal View History

FEATURE: Add BGE-M3 embeddings support (#569) BAAI/bge-m3 is an interesting model, that is multilingual and with a context size of 8192. Even with a 16x larger context, it's only 4x slower to compute it's embeddings on the worst case scenario. Also includes a minor refactor of the rake task, including setting model and concurrency levels when running the backfill task.
2024-04-10 17:24:01 -03:00
# frozen_string_literal: true
module DiscourseAi
module Tokenizer
class BgeM3Tokenizer < BasicTokenizer
def self.tokenizer
@@tokenizer ||= Tokenizers.from_file("./plugins/discourse-ai/tokenizers/bge-m3.json")
end
end
end
end
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 73ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API