Settings for Hugging Face bge-large-en embeddings? -> RAG bots unresponsive!

@Falco

here’s what happened when I ran the test code (with bge-large-en running on AWS dedicated endpoint instance configured as embedding model)


root@studyqa-ubuntu-s-1vcpu-2gb-amd-sfo3-01-app:/var/www/discourse# rails c

[1] pry(main)> strategy = DiscourseAi::Embeddings::Strategies::Truncation.new

puts "Strategy initialized"

vector_rep = DiscourseAi::Embeddings::VectorRepresentations::Base.current_representation(strategy)

puts "Vector representation obtained"

vector = vector_rep.vector_from("test")

[1] pry(main)> strategy = DiscourseAi::Embeddings::Strategies::Truncation.new

puts "Strategy initialized"

vector_rep = DiscourseAi::Embeddings::VectorRepresentations::Base.current_representation(strategy)

puts "Vector representation obtained"

vector = vector_rep.vector_from("test")

puts "Vector generated"

puts vector.inspect

Strategy initialized

Vector representation obtained

Vector generated

[:embeddings, [-0.0020444912370294333, 0.008787356317043304, -0.010865539312362671, 0.01865551434457302, -0.02099628746509552, -0.009864491410553455, -0.0011329081607982516, 0.02949545904994011, 0.027839021757245064, 0.043966952711343765, 0.0406080037355423, 0.0016647017328068614, 0.007204003632068634, -0.03770752251148224, -0.025242917239665985, -0.0015279072104021907, -0.02805529721081257, -0.020901955664157867, -0.029206447303295135, -0.006209365092217922, -0.02105099707841873,

etc.


it seems to be hitting bge-large-en in aws:

- 2024-05-29T13:57:34.609+00:00 Batches: 0%| | 0/1 [00:00<?, ?it/s] Batches: 100%|██████████| 1/1 [00:00<00:00, 4.80it/s] Batches: 100%|██████████| 1/1 [00:00<00:00, 4.79it/s]

• 2024/05/29 09:57:34
INFO | POST / | Duration: 212.84 ms


- 2024-05-29T13:57:53.806+00:00 Batches: 0%| | 0/1 [00:00<?, ?it/s] Batches: 100%|██████████| 1/1 [00:01<00:00, 1.97s/it] Batches: 100%|██████████| 1/1 [00:01<00:00, 1.97s/it]

• 2024/05/29 09:57:53
INFO | POST / | Duration: 1978.36 ms
1 Like