mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 08:26:21 +02:00
Feature/fastembed (#286)
* Copied in base files for fastembed * Added fastembed implementation * Added template support for fastembed
This commit is contained in:
parent
75a72b0d2d
commit
6c3d2e7f97
7 changed files with 151 additions and 1 deletions
43
templates/components/embeddings-fastembed.jsonnet
Normal file
43
templates/components/embeddings-fastembed.jsonnet
Normal 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,
|
||||
])
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue