Feature/fastembed (#286)

* Copied in base files for fastembed

* Added fastembed implementation

* Added template support for fastembed
This commit is contained in:
cybermaggedon 2025-01-28 18:26:17 +00:00 committed by GitHub
parent 75a72b0d2d
commit 6c3d2e7f97
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 151 additions and 1 deletions

View file

@ -0,0 +1,43 @@
local base = import "base/base.jsonnet";
local images = import "values/images.jsonnet";
local url = import "values/url.jsonnet";
local prompts = import "prompts/mixtral.jsonnet";
{
"embeddings-model":: "sentence-transformers/all-MiniLM-L6-v2",
embeddings +: {
create:: function(engine)
local container =
engine.container("embeddings")
.with_image(images.trustgraph)
.with_command([
"embeddings-fastembed",
"-p",
url.pulsar,
"-m",
$["embeddings-model"],
])
.with_limits("1.0", "400M")
.with_reservations("0.5", "400M");
local containerSet = engine.containers(
"embeddings", [ container ]
);
local service =
engine.internalService(containerSet)
.with_port(8000, 8000, "metrics");
engine.resources([
containerSet,
service,
])
},
}