bkhmsi commited on
Commit
3768f67
·
1 Parent(s): 9a48e97

fixed config path

Browse files
Files changed (1) hide show
  1. router_backend.py +5 -1
router_backend.py CHANGED
@@ -14,6 +14,7 @@ Example return formats:
14
  - (12.5, 45.0, 22.5, 20.0)
15
  """
16
  import torch
 
17
  import numpy as np
18
  import torch.nn.functional as F
19
  from transformers import AutoTokenizer, AutoModelForCausalLM, AutoConfig
@@ -191,7 +192,10 @@ def build_model(model_id: str, hf_token: str, use_cache: bool = True):
191
  model_path, base_model, model_class = get_model_path(model_id)
192
 
193
  model_config = AutoConfig.from_pretrained(base_model, use_auth_token=hf_token)
194
- model_config.config_path = f"configs/{model_id}.yml"
 
 
 
195
 
196
  model_config.torch_dtype = torch.bfloat16
197
  model_config.use_bfloat16 = True
 
14
  - (12.5, 45.0, 22.5, 20.0)
15
  """
16
  import torch
17
+ import pathlib
18
  import numpy as np
19
  import torch.nn.functional as F
20
  from transformers import AutoTokenizer, AutoModelForCausalLM, AutoConfig
 
192
  model_path, base_model, model_class = get_model_path(model_id)
193
 
194
  model_config = AutoConfig.from_pretrained(base_model, use_auth_token=hf_token)
195
+
196
+ parent_path = pathlib.Path(__file__).parent
197
+
198
+ model_config.config_path = f"{parent_path}/configs/{model_id}.yml"
199
 
200
  model_config.torch_dtype = torch.bfloat16
201
  model_config.use_bfloat16 = True