offlinedemo 0.5.0__tar.gz → 0.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: offlinedemo
3
- Version: 0.5.0
3
+ Version: 0.6.0
4
4
  Summary: Easy demonstration of models by offlineisbetter.
5
5
  Author: offlineisbetter
6
6
  Author-email: offlineisbetter <dev@offlineisbetter.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "offlinedemo"
3
- version = "0.5.0"
3
+ version = "0.6.0"
4
4
  description = "Easy demonstration of models by offlineisbetter."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "offlinedemo"
3
- version = "0.5.0"
3
+ version = "0.6.0"
4
4
  description = "Easy demonstration of models by offlineisbetter."
5
5
  readme = "README.md"
6
6
  authors = [
@@ -11,6 +11,10 @@ import numpy as np
11
11
  from tokenizers import Tokenizer
12
12
  import onnxruntime as ort
13
13
 
14
+ OPT = ort.SessionOptions()
15
+ OPT.intra_op_num_threads = 1
16
+ OPT.inter_op_num_threads = 1
17
+
14
18
  def main():
15
19
  # Get checkpoint name
16
20
  if len(sys.argv) < 2:
@@ -21,6 +25,7 @@ def main():
21
25
  # Load checkpoint
22
26
  session = ort.InferenceSession(
23
27
  checkpoint / "model.onnx",
28
+ OPT,
24
29
  providers=["CPUExecutionProvider"],
25
30
  )
26
31
  print("Model loaded!")
File without changes