mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-08-30 02:53:41 +08:00
Fix --encode-only
This commit is contained in:
parent
83b68a5bdb
commit
0779417903
3
t5/t5.py
3
t5/t5.py
@ -394,8 +394,7 @@ if __name__ == "__main__":
|
||||
if args.encode_only:
|
||||
print("[INFO] Encoding with T5...", flush=True)
|
||||
print(args.prompt, flush=True)
|
||||
embeddings = model.wte(prompt)
|
||||
encoder_output = model.encoder(embeddings, mask=None)
|
||||
encoder_output = model.encode(prompt)
|
||||
print(encoder_output, flush=True)
|
||||
exit(0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user