Skip to content

feat(llm): add RAG embedding models to huggingface.loc#2020

Merged
arash77 merged 3 commits intomasterfrom
add-rag-models
Apr 28, 2026
Merged

feat(llm): add RAG embedding models to huggingface.loc#2020
arash77 merged 3 commits intomasterfrom
add-rag-models

Conversation

@arash77
Copy link
Copy Markdown
Member

@arash77 arash77 commented Apr 27, 2026

This PR adds the RAG embedding models (sentence-transformers/all-MiniLM-L6-v2 and BAAI/bge-small-en) to the huggingface.loc file.

Admins should download the models from the server using the following script:
https://github.com/bgruening/galaxytools/blob/master/tools/rag/download_embeddings.py

ref #2008

@arash77
Copy link
Copy Markdown
Member Author

arash77 commented Apr 27, 2026

@anuprulez, can you also make any necessary changes to the free tag here?

Comment thread files/galaxy/config/llm/huggingface.loc Outdated
Comment thread files/galaxy/config/llm/huggingface.loc Outdated
@arash77
Copy link
Copy Markdown
Member Author

arash77 commented Apr 28, 2026

Updated the tool in bgruening/galaxytools#1854

@anuprulez
Copy link
Copy Markdown
Member

These changes look good from my side.

@kysrpex
Copy link
Copy Markdown
Contributor

kysrpex commented Apr 28, 2026

@arash77 Models are not there yet.

root@sn09:/home/centos$ ls -lah /data/db/models/huggingface/embeddings/sentence-transformers/all-MiniLM-L6-v2 /data/db/models/huggingface/embeddings/BAAI/bge-small-en
ls: cannot access '/data/db/models/huggingface/embeddings/sentence-transformers/all-MiniLM-L6-v2': No such file or directory
ls: cannot access '/data/db/models/huggingface/embeddings/BAAI/bge-small-en': No such file or directory

@kysrpex
Copy link
Copy Markdown
Contributor

kysrpex commented Apr 28, 2026

@arash77

root@sn09:/home/centos$ ls -lah /data/db/models/huggingface/embeddings/sentence-transformers/all-MiniLM-L6-v2 /data/db/models/huggingface/embeddings/BAAI/bge-small-en
ls: cannot access '/data/db/models/huggingface/embeddings/sentence-transformers/all-MiniLM-L6-v2': No such file or directory
ls: cannot access '/data/db/models/huggingface/embeddings/BAAI/bge-small-en': No such file or directory

Models are there now 👍

(venv) galaxy@sn09:~$ curl https://raw.githubusercontent.com/bgruening/galaxytools/refs/heads/master/tools/rag/download_embeddings.py | UV_CACHE_DIR="$(mktemp -d)" HF_MODEL_DIR=/data/db/models/huggingface/embeddings/ HOME="$(mktemp -d)" uv run --with sentence-transformers python - --models sentence-transformers/all-MiniLM-L6-v2 BAAI/bge-small-en
...
Installed 58 packages in 8.67s

[START] Downloading: sentence-transformers/all-MiniLM-L6-v2
[PATH] Destination: /data/db/models/huggingface/embeddings/sentence-transformers/all-MiniLM-L6-v2
Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.
modules.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 349/349 [00:00<00:00, 1.77MB/s]
config_sentence_transformers.json: 100%|██████████████████████████████████████████████████████████████████████████| 116/116 [00:00<00:00, 586kB/s]
README.md: 10.5kB [00:00, 12.2MB/s]
sentence_bert_config.json: 100%|████████████████████████████████████████████████████████████████████████████████| 53.0/53.0 [00:00<00:00, 191kB/s]
config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 612/612 [00:00<00:00, 3.57MB/s]
model.safetensors: 100%|█████████████████████████████████████████████████████████████████████████████████████| 90.9M/90.9M [00:01<00:00, 63.3MB/s]
Loading weights: 100%|████████████████████████████████████████████████████████████████████████████████████████| 103/103 [00:00<00:00, 5586.11it/s]
tokenizer_config.json: 100%|█████████████████████████████████████████████████████████████████████████████████████| 350/350 [00:00<00:00, 2.14MB/s]
vocab.txt: 232kB [00:00, 27.0MB/s]
tokenizer.json: 466kB [00:00, 55.2MB/s]
special_tokens_map.json: 100%|████████████████████████████████████████████████████████████████████████████████████| 112/112 [00:00<00:00, 559kB/s]
config.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████| 190/190 [00:00<00:00, 730kB/s]
Writing model shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00,  2.77it/s]
[SUCCESS] Saved sentence-transformers/all-MiniLM-L6-v2

[START] Downloading: BAAI/bge-small-en
[PATH] Destination: /data/db/models/huggingface/embeddings/BAAI/bge-small-en
modules.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 349/349 [00:00<00:00, 2.01MB/s]
config_sentence_transformers.json: 100%|██████████████████████████████████████████████████████████████████████████| 124/124 [00:00<00:00, 857kB/s]
README.md: 90.8kB [00:00, 28.2MB/s]
sentence_bert_config.json: 100%|████████████████████████████████████████████████████████████████████████████████| 52.0/52.0 [00:00<00:00, 364kB/s]
config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 684/684 [00:00<00:00, 4.40MB/s]
model.safetensors: 100%|███████████████████████████████████████████████████████████████████████████████████████| 133M/133M [00:01<00:00, 83.0MB/s]
Loading weights: 100%|████████████████████████████████████████████████████████████████████████████████████████| 199/199 [00:00<00:00, 5361.73it/s]
tokenizer_config.json: 100%|█████████████████████████████████████████████████████████████████████████████████████| 366/366 [00:00<00:00, 2.58MB/s]
vocab.txt: 232kB [00:00, 45.5MB/s]
tokenizer.json: 711kB [00:00, 88.6MB/s]
special_tokens_map.json: 100%|████████████████████████████████████████████████████████████████████████████████████| 125/125 [00:00<00:00, 904kB/s]
config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 190/190 [00:00<00:00, 1.44MB/s]
Writing model shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00,  2.06it/s]
[SUCCESS] Saved BAAI/bge-small-en

All tasks completed.
(venv) galaxy@sn09:~$ ls -lah /data/db/models/huggingface/embeddings/*/
/data/db/models/huggingface/embeddings/BAAI/:
total 96K
drwxr-xr-x 3 galaxy galaxy  30 Apr 28 16:17 .
drwxr-xr-x 4 galaxy galaxy  61 Apr 28 16:17 ..
drwxr-xr-x 4 galaxy galaxy 342 Apr 28 16:21 bge-small-en

/data/db/models/huggingface/embeddings/sentence-transformers/:
total 96K
drwxr-xr-x 3 galaxy galaxy  34 Apr 28 16:17 .
drwxr-xr-x 4 galaxy galaxy  61 Apr 28 16:17 ..
drwxr-xr-x 4 galaxy galaxy 342 Apr 28 16:21 all-MiniLM-L6-v2

@arash77
Copy link
Copy Markdown
Member Author

arash77 commented Apr 28, 2026

Models are there now 👍

Thank you!

@arash77 arash77 merged commit dcc5d34 into master Apr 28, 2026
2 checks passed
@arash77 arash77 deleted the add-rag-models branch April 28, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants