Skip to content

Instantly share code, notes, and snippets.

@trodrigu
Last active October 22, 2023 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trodrigu/ecc46b26a34670474ad972b38f98833e to your computer and use it in GitHub Desktop.
Save trodrigu/ecc46b26a34670474ad972b38f98833e to your computer and use it in GitHub Desktop.
bench_models
Mix.install(
[
{:exla, "~> 0.6.1"},
{:bumblebee, "~> 0.4.2", github: "elixir-nx/bumblebee", branch: "main"},
{:benchee, "~> 1.1"}
],
config: [nx: [default_backend: EXLA.Backend]]
)
Benchee.run(%{
"sentence-transformers/all-MiniLM-L6-v2" => fn ->
Bumblebee.load_model({:hf, "sentence-transformers/all-MiniLM-L6-v2"})
end,
"BAAI/bge-large-en-v1.5" => fn -> Bumblebee.load_model({:hf, "BAAI/bge-large-en-v1.5"}) end
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment