mnauf commited on
Commit
6d6fec4
·
1 Parent(s): 4a73f56

enabled pytorch 2 compile for deployment

Browse files
Files changed (3) hide show
  1. __pycache__/sample.cpython-38.pyc +0 -0
  2. app.py +1 -1
  3. sample.py +1 -1
__pycache__/sample.cpython-38.pyc CHANGED
Binary files a/__pycache__/sample.cpython-38.pyc and b/__pycache__/sample.cpython-38.pyc differ
 
app.py CHANGED
@@ -44,6 +44,6 @@ with gr.Blocks() as block:
44
  fn=generate_text,
45
  inputs=inputs,
46
  outputs=outputs,
47
- queue=False
48
  )
49
  block.queue(concurrency_count=3).launch()
 
44
  fn=generate_text,
45
  inputs=inputs,
46
  outputs=outputs,
47
+ queue=True
48
  )
49
  block.queue(concurrency_count=3).launch()
sample.py CHANGED
@@ -19,7 +19,7 @@ top_k = 200 # retain only the top_k most likely tokens, clamp others to have 0 p
19
  seed = 1337
20
  device = 'cpu' # examples: 'cpu', 'cuda', 'cuda:0', 'cuda:1', etc.
21
  dtype = 'bfloat16' # 'float32' or 'bfloat16' or 'float16'
22
- compile = False # use PyTorch 2.0 to compile the model to be faster
23
  exec(open('configurator.py').read()) # overrides from command line or config file
24
  # -----------------------------------------------------------------------------
25
 
 
19
  seed = 1337
20
  device = 'cpu' # examples: 'cpu', 'cuda', 'cuda:0', 'cuda:1', etc.
21
  dtype = 'bfloat16' # 'float32' or 'bfloat16' or 'float16'
22
+ compile = True # use PyTorch 2.0 to compile the model to be faster
23
  exec(open('configurator.py').read()) # overrides from command line or config file
24
  # -----------------------------------------------------------------------------
25