-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArcticEmbedLEncoder #2694
ArcticEmbedLEncoder #2694
Conversation
Here is the full command used, for posterity
|
technically, e2e is done, pending l2 norm or whatever verifications for closeness.
Apparently the mean pooling strategy might cause the drop? 0.0441. Clearly too high. |
After aligning with how Snowflake does the pooling stuff... it works. Results attached above |
static private final String MODEL_URL = "https://huggingface.co/Snowflake/snowflake-arctic-embed-l/blob/main/onnx/model.onnx"; | ||
static private final String VOCAB_URL = "https://huggingface.co/Snowflake/snowflake-arctic-embed-l/blob/main/vocab.txt"; | ||
|
||
static private final String MODEL_NAME = "snowflake-arctic-embed-l-official.onnx"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left official in for now just because I haven't updated the huggingface link to be on UW server
* ArcticEmbedL | ||
*/ | ||
public class ArcticEmbedLEncoder extends DenseEncoder { | ||
static private final String MODEL_URL = "https://huggingface.co/Snowflake/snowflake-arctic-embed-l/blob/main/onnx/model.onnx"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and of course both urls have to change at some point
Adding tokenization and inference tests |
static private final int EMBEDDING_DIM = 1024; | ||
|
||
static private final Object[][] EXAMPLES = new Object[][] { | ||
{ new long[] { 101, 5050, 2023, 6251, 2005, 6575, 7882, 13768, 1024, 2339, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit - can make wider to take up fewer lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
@vincent-4 we're good to merge? |
Yes. Thanks! |
Starting PR for @b8zhong
Mostly looking for a sanity check of initial impl of src/main/java/io/anserini/encoder/dense/ArcticEmbedLEncoder.java
Not implemented yet:
Q: am I good to convert Arctic-embed-l to ONNX, then run with src/main/java/io/anserini/encoder/dense/ArcticEmbedLEncoder.java now?