Martín Santillán Cooper commited on
Commit
182a21a
1 Parent(s): b183100

Move imports

Browse files
Files changed (1) hide show
  1. model.py +4 -4
model.py CHANGED
@@ -2,9 +2,7 @@ import os
2
  from time import time, sleep
3
  from logger import logger
4
  import math
5
- import torch
6
- from vllm import LLM, SamplingParams
7
- from transformers import AutoTokenizer
8
 
9
 
10
 
@@ -51,7 +49,9 @@ def get_probablities(logprobs):
51
 
52
  mock_model_call = os.getenv('MOCK_MODEL_CALL') == 'true'
53
  if not mock_model_call:
54
- use_conda = os.getenv('USE_CONDA', "false") == "true"
 
 
55
  model_path = os.getenv('MODEL_PATH')#"granite-guardian-3b-pipecleaner-r241024a"
56
  sampling_params = SamplingParams(temperature=0.0, logprobs=nlogprobs)
57
  model = LLM(model=model_path, tensor_parallel_size=1)
 
2
  from time import time, sleep
3
  from logger import logger
4
  import math
5
+
 
 
6
 
7
 
8
 
 
49
 
50
  mock_model_call = os.getenv('MOCK_MODEL_CALL') == 'true'
51
  if not mock_model_call:
52
+ import torch
53
+ from vllm import LLM, SamplingParams
54
+ from transformers import AutoTokenizer
55
  model_path = os.getenv('MODEL_PATH')#"granite-guardian-3b-pipecleaner-r241024a"
56
  sampling_params = SamplingParams(temperature=0.0, logprobs=nlogprobs)
57
  model = LLM(model=model_path, tensor_parallel_size=1)