Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Formatting change

davidmezzetti1031be0d2fe8
diff --git a/src/python/txtai/pipeline/hfonnx.py b/src/python/txtai/pipeline/hfonnx.py
index 6729bab1..47264ca8 100644
--- a/src/python/txtai/pipeline/hfonnx.py
+++ b/src/python/txtai/pipeline/hfonnx.py
@@ -138,10 +138,7 @@ class HFOnnx(Tensors):
)
config = {
- "default": (
- OrderedDict({"last_hidden_state": {0: "batch", 1: "sequence"}}),
- AutoModel.from_pretrained,
- ),
+ "default": (OrderedDict({"last_hidden_state": {0: "batch", 1: "sequence"}}), AutoModel.from_pretrained),
"causal-lm": (OrderedDict({"logits": {0: "batch", 1: "sequence"}}), AutoModelForCausalLM.from_pretrained),
"pooling": (OrderedDict({"embeddings": {0: "batch", 1: "sequence"}}), lambda x: MeanPoolingOnnx(x, -1)),
"seq2seq-lm": (OrderedDict({"logits": {0: "batch", 1: "decoder_sequence"}}), AutoModelForSeq2SeqLM.from_pretrained),