xyzhang626 / embeddings.cpp Goto Github PK
View Code? Open in Web Editor NEWThis project forked from skeskinen/bert.cpp
ggml implementation of embedding models including SentenceTransformer and BGE
License: MIT License
This project forked from skeskinen/bert.cpp
ggml implementation of embedding models including SentenceTransformer and BGE
License: MIT License
I'm following the examples from the readme.
When I run:
python download-repo.py BAAI/bge-base-en-v1.5 # or any other model
sh run_conversions.sh bge-base-en-v1.5
It fails at the quantization step:
[...]
Done. Output file: bge-base-en-v1.5/ggml-model-f16.bin
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Is there something I can do to make it work?
Do you have any plans to support the other backends that LlamaCPP supports so that this can be accelerated?
In convert-to-ggml.py line 34, tokenizer.json seems ignored when convert model to ggml
This repo's tokenizer works consistently with huggingface's tokenizer in the most cases and works inconsistently but possibly better bge zh series model.
bge-small-zh-v1.5
tokenizer will be bad at 1) words with capital letter 2) accent letter. It can be caused by the normalization setting of it.
For example, in the case 大家好我是GPT
, hf tokenizer (left column) can not recognize the upper GPT
but tokenizer in this repo (right column) can do it.
It's similar for the accent case.
If you find any more differences between tokenizer in this repo with the huggingface one, please let me know I will try to fix it.
In server.cpp, bert_encode seems not thread-safe, different invocation works in same memory buffer in bert_context
while(true) {
std::string string_in = receive_string(new_socket);
if (string_in.empty()) {
break;
}
std::vector<float> embeddings = std::vector<float>(n_embd);
bert_encode(bctx, params.n_threads, string_in.data(), embeddings.data());
send_floats(new_socket, embeddings);
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.