yuto0o commited on
Commit
dd95ee1
·
1 Parent(s): a8fd17e

性能検査

Browse files
Files changed (2) hide show
  1. ml_api/api.py +1 -1
  2. ml_api/model_loader.py +1 -1
ml_api/api.py CHANGED
@@ -38,7 +38,7 @@ def chat(request, data: ChatInput):
38
  with torch.no_grad():
39
  generated_ids = model.generate(
40
  **inputs,
41
- max_new_tokens=256,
42
  do_sample=True,
43
  temperature=0.7,
44
  top_p=0.9,
 
38
  with torch.no_grad():
39
  generated_ids = model.generate(
40
  **inputs,
41
+ max_new_tokens=1024,
42
  do_sample=True,
43
  temperature=0.7,
44
  top_p=0.9,
ml_api/model_loader.py CHANGED
@@ -28,7 +28,7 @@ def get_model():
28
 
29
  _model = AutoModelForCausalLM.from_pretrained(
30
  model_name,
31
- torch_dtype=dtype,
32
  trust_remote_code=True,
33
  )
34
  print(f"Model Loaded! (dtype: {dtype})")
 
28
 
29
  _model = AutoModelForCausalLM.from_pretrained(
30
  model_name,
31
+ dtype=dtype,
32
  trust_remote_code=True,
33
  )
34
  print(f"Model Loaded! (dtype: {dtype})")