dmedhi commited on
Commit
96e3c72
·
verified ·
1 Parent(s): b1035f5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -19
README.md CHANGED
@@ -46,7 +46,7 @@ This model was trained using knowledge distillation from the [IBM Granite-278M](
46
 
47
  ### Using Transformers
48
 
49
- ```
50
  from transformers import AutoModel, AutoTokenizer
51
  import torch
52
  import torch.nn.functional as F
@@ -72,7 +72,7 @@ print(f"Similarity: {similarity.item():.4f}")
72
 
73
  ### Using Sentence-Transformers
74
 
75
- ```
76
  from sentence_transformers import SentenceTransformer
77
  from sentence_transformers.util import cos_sim
78
 
@@ -86,23 +86,6 @@ similarity = cos_sim(embeddings, embeddings)
86
  print(f"Similarity: {similarity.item():.4f}")
87
  ```
88
 
89
- ======================================================================
90
- COMPARING INFERENCE SPEED (Student vs Teacher)
91
- ======================================================================
92
- Average inference time over 100 runs with 10 sentences (max_length=128):
93
- Teacher Model: 17.944 ms
94
- Student Model: 2.759 ms
95
- Student is 6.5x faster than Teacher.
96
-
97
- CPU speed comparision
98
-
99
- ======================================================================
100
- COMPARING INFERENCE SPEED (Student vs Teacher)
101
- ======================================================================
102
- Average inference time over 100 runs with 10 sentences (max_length=128):
103
- Teacher Model: 269.578 ms
104
- Student Model: 11.577 ms
105
- Student is 23.3x faster than Teacher.
106
 
107
  ## Performance
108
 
 
46
 
47
  ### Using Transformers
48
 
49
+ ```Python
50
  from transformers import AutoModel, AutoTokenizer
51
  import torch
52
  import torch.nn.functional as F
 
72
 
73
  ### Using Sentence-Transformers
74
 
75
+ ```Python
76
  from sentence_transformers import SentenceTransformer
77
  from sentence_transformers.util import cos_sim
78
 
 
86
  print(f"Similarity: {similarity.item():.4f}")
87
  ```
88
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
 
90
  ## Performance
91