Turkunov Y commited on
Commit
9a67f50
1 Parent(s): cb5f8f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -4,16 +4,17 @@ from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
4
  import torch
5
 
6
  model_id = 'openlm-research/open_llama_3b_v2'
7
- bnb_config = BitsAndBytesConfig(
 
8
  load_in_4bit=True,
9
  bnb_4bit_use_double_quant=True,
10
  bnb_4bit_quant_type="fp4",
11
  bnb_4bit_compute_dtype=torch.bfloat16
12
- )
13
 
14
  model = AutoModelForCausalLM.from_pretrained(
15
  model_id,
16
- quantization_config=bnb_config # Необходимо раскомментить при досутпе к GPU
17
  )
18
  tokenizer = AutoTokenizer.from_pretrained(model_id)
19
 
 
4
  import torch
5
 
6
  model_id = 'openlm-research/open_llama_3b_v2'
7
+
8
+ """bnb_config = BitsAndBytesConfig(
9
  load_in_4bit=True,
10
  bnb_4bit_use_double_quant=True,
11
  bnb_4bit_quant_type="fp4",
12
  bnb_4bit_compute_dtype=torch.bfloat16
13
+ )"""
14
 
15
  model = AutoModelForCausalLM.from_pretrained(
16
  model_id,
17
+ # quantization_config=bnb_config # Необходимо раскомментить при досутпе к GPU
18
  )
19
  tokenizer = AutoTokenizer.from_pretrained(model_id)
20