skaltenp commited on
Commit
3c55e75
1 Parent(s): f333074

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -4,17 +4,17 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
4
 
5
  model_name = "DiscoResearch/DiscoLM_German_7b_v1"
6
  bnb_config = BitsAndBytesConfig(
7
- load_in_4bit=True,
8
- bnb_4bit_quant_type="nf4",
9
- bnb_4bit_compute_dtype=torch.float16,
10
- )
11
- base_model = AutoModelForCausalLM.from_pretrained(
12
- model_name,
13
- quantization_config=bnb_config,
14
- device_map="auto",
15
- trust_remote_code=True,
16
- token=True,
17
- )
18
  model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True)
19
  tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
20
 
 
4
 
5
  model_name = "DiscoResearch/DiscoLM_German_7b_v1"
6
  bnb_config = BitsAndBytesConfig(
7
+ load_in_4bit=True,
8
+ bnb_4bit_quant_type="nf4",
9
+ bnb_4bit_compute_dtype=torch.float16,
10
+ )
11
+ base_model = AutoModelForCausalLM.from_pretrained(
12
+ model_name,
13
+ quantization_config=bnb_config,
14
+ device_map="auto",
15
+ trust_remote_code=True,
16
+ token=True,
17
+ )
18
  model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True)
19
  tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
20