ganchengguang commited on
Commit
cb20107
1 Parent(s): 2b203a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -4,7 +4,12 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
4
  # 加载本地模型和tokenizer
5
  model_name = "ganchengguang/OIELLM-8B-Instruction" # 替换为你的模型名称
6
  tokenizer = AutoTokenizer.from_pretrained(model_name)
7
- model = AutoModelForCausalLM.from_pretrained(model_name, load_in_8bit=True, device_map='auto')
 
 
 
 
 
8
 
9
  # 定义语言和选项的映射
10
  options = {
 
4
  # 加载本地模型和tokenizer
5
  model_name = "ganchengguang/OIELLM-8B-Instruction" # 替换为你的模型名称
6
  tokenizer = AutoTokenizer.from_pretrained(model_name)
7
+ model = AutoModelForCausalLM.from_pretrained(
8
+ model_name,
9
+ load_in_8bit=True,
10
+ device_map='auto',
11
+ low_cpu_mem_usage=True
12
+ )
13
 
14
  # 定义语言和选项的映射
15
  options = {