-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
How can we batch multiple inputs when computing the embeddings using a trained model? The script command/inference/get_embedding.py demonstrates how to compute a single function's embedding, but it has slow throughput.
I tried to concatenate the tensors for each respective field in the dicts produced from sample_emb = trex.process_token_dict(sample_tokens), but ran into a problem where the inputs needed to first be padded to the proper length, and I could not determine how to pad them or determine what the proper padding value is for each field.
Could you please give an example of computing embeddings for multiple functions at once?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels