Sync model card from GitHub f15131d
Browse files
README.md
CHANGED
|
@@ -46,17 +46,17 @@ egemma2 similarity --query "red planet" --doc "Mars is the fourth planet" --doc
|
|
| 46 |
|
| 47 |
Checked number for number against the PyTorch reference (transformers + sentence-transformers) on 90
|
| 48 |
checks covering text, images, audio, video and prompts: float32 embeddings differ by at most 1e-6.
|
| 49 |
-
bf16 mode stays within cosine 0.99996 of float32, about
|
| 50 |
|
| 51 |
## Speed (RTX A3000 laptop GPU, warm medians)
|
| 52 |
|
| 53 |
| Workload | PyTorch bf16 | **Rust bf16** | |
|
| 54 |
|---|---|---|---|
|
| 55 |
-
| short query (17 tokens) |
|
| 56 |
-
| long document (2,208 tokens) | 136 ms | **
|
| 57 |
-
| batch of 64 short documents |
|
| 58 |
-
| image 641x479 | 151 ms | **59.
|
| 59 |
-
| audio 9.3 s |
|
| 60 |
|
| 61 |
On the CPU (i7-12850HX) Rust is 1.2 - 1.9x faster than PyTorch, starts in 0.9 s instead of 11 s and
|
| 62 |
uses about 4x less memory. fp32/TF32 numbers and methodology are in the
|
|
|
|
| 46 |
|
| 47 |
Checked number for number against the PyTorch reference (transformers + sentence-transformers) on 90
|
| 48 |
checks covering text, images, audio, video and prompts: float32 embeddings differ by at most 1e-6.
|
| 49 |
+
bf16 mode stays within cosine 0.99996 of float32, about 7x closer than PyTorch's own bf16 mode.
|
| 50 |
|
| 51 |
## Speed (RTX A3000 laptop GPU, warm medians)
|
| 52 |
|
| 53 |
| Workload | PyTorch bf16 | **Rust bf16** | |
|
| 54 |
|---|---|---|---|
|
| 55 |
+
| short query (17 tokens) | 52.9 ms | **2.6 ms** | 20x |
|
| 56 |
+
| long document (2,208 tokens) | 136 ms | **47.1 ms** | 2.9x |
|
| 57 |
+
| batch of 64 short documents | 119 ms | **45.1 ms** | 2.6x |
|
| 58 |
+
| image 641x479 | 151 - 169 ms | **59.1 ms** | 2.5 - 2.9x |
|
| 59 |
+
| audio 9.3 s | 100 ms | **19.5 ms** | 5.1x |
|
| 60 |
|
| 61 |
On the CPU (i7-12850HX) Rust is 1.2 - 1.9x faster than PyTorch, starts in 0.9 s instead of 11 s and
|
| 62 |
uses about 4x less memory. fp32/TF32 numbers and methodology are in the
|