shigureui commited on
Commit
a7aa8f8
·
verified ·
1 Parent(s): ee4ae0e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -2
README.md CHANGED
@@ -44,10 +44,15 @@ inputs = [
44
  "prompt": f"{image_placeholder}\nA woman shares a joyful moment with her golden retriever on a sun-drenched beach at sunset, as the dog offers its paw in a heartwarming display of companionship and trust.",
45
  "multi_modal_data": {"image": image},
46
  },
47
- ] * 200
48
 
49
  outputs = model.embed(inputs)
50
  embeddings = torch.tensor([o.outputs.embedding for o in outputs])
51
  scores = embeddings[:2] @ embeddings[2:].T
52
  print(scores.tolist())
53
- ```
 
 
 
 
 
 
44
  "prompt": f"{image_placeholder}\nA woman shares a joyful moment with her golden retriever on a sun-drenched beach at sunset, as the dog offers its paw in a heartwarming display of companionship and trust.",
45
  "multi_modal_data": {"image": image},
46
  },
47
+ ]
48
 
49
  outputs = model.embed(inputs)
50
  embeddings = torch.tensor([o.outputs.embedding for o in outputs])
51
  scores = embeddings[:2] @ embeddings[2:].T
52
  print(scores.tolist())
53
+ ```
54
+
55
+ It is faster by at least 50%, by all meanings.
56
+
57
+
58
+ ![0a302fd6f1813ee467c2242b33466f65](https://cdn-uploads.huggingface.co/production/uploads/6338187db7ce9192552401c0/td9QwL3hadGpfILrp8GiQ.png)