allenai / allenai/specter

Can we get calculated embeddings directly into variable?

未关闭
#10 12 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
592
派生
58
PR 合并指标
30 天内没有已合并 PR

描述

`embed.py` script calculates embeddings of inputs in `sample-metadata.json` and stores them in output file `output.jsonl`

```
python scripts/embed.py \
--ids data/sample.ids --metadata data/sample-metadata.json \
--model ./model.tar.gz \
--output-file output.jsonl \
--vocab-dir data/vocab/ \
--batch-size 16 \
--cuda-device -1
```
Is there any way to call the function directly from python script and get the output embeddings in a variable? ...something like the web-api is doing but locally, offline
I do not want to load the model for each evaluation call

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。