seawolf2357 commited on
Commit
e26fb8b
Β·
verified Β·
1 Parent(s): f06ad4e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -11,7 +11,14 @@ from accelerate import Accelerator
11
  hf_api_key = os.getenv('HF_API_KEY')
12
 
13
  # λͺ¨λΈ ID 및 ν† ν¬λ‚˜μ΄μ € μ„€μ •
 
14
  model_id = "microsoft/Phi-3-mini-128k-instruct"
 
 
 
 
 
 
15
  tokenizer = AutoTokenizer.from_pretrained(model_id, token=hf_api_key)
16
  accelerator = Accelerator()
17
 
 
11
  hf_api_key = os.getenv('HF_API_KEY')
12
 
13
  # λͺ¨λΈ ID 및 ν† ν¬λ‚˜μ΄μ € μ„€μ •
14
+ # λͺ¨λΈ ID
15
  model_id = "microsoft/Phi-3-mini-128k-instruct"
16
+
17
+ # μ‚¬μš©μž μ •μ˜ μ½”λ“œλ₯Ό μ‹ λ’°ν•˜κ³  μ‹€ν–‰ν•˜λ„λ‘ μ„€μ •
18
+ model = AutoModelForCausalLM.from_pretrained(
19
+ model_id,
20
+ trust_remote_code=True # μ‚¬μš©μž μ •μ˜ μ½”λ“œ μ‹€ν–‰ ν—ˆμš©
21
+ )
22
  tokenizer = AutoTokenizer.from_pretrained(model_id, token=hf_api_key)
23
  accelerator = Accelerator()
24