CyberNative commited on
Commit
450a1d6
1 Parent(s): a5dfc71

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -47,7 +47,13 @@ h1 {
47
 
48
  # Load the tokenizer and model
49
  tokenizer = AutoTokenizer.from_pretrained("CyberNative-AI/Colibri_8b_v0.1")
50
- model = AutoModelForCausalLM.from_pretrained("CyberNative-AI/Colibri_8b_v0.1", load_in_4bit=False, load_in_8bit=True, device_map="auto")
 
 
 
 
 
 
51
  terminators = [
52
  tokenizer.eos_token_id,
53
  tokenizer.convert_tokens_to_ids("<|eot_id|>")
 
47
 
48
  # Load the tokenizer and model
49
  tokenizer = AutoTokenizer.from_pretrained("CyberNative-AI/Colibri_8b_v0.1")
50
+ #model = AutoModelForCausalLM.from_pretrained("CyberNative-AI/Colibri_8b_v0.1", load_in_4bit=True, load_in_8bit=False, device_map="auto")
51
+
52
+ from transformers import BitsAndBytesConfig
53
+
54
+ nf4_config = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4")
55
+ model = AutoModelForCausalLM.from_pretrained(model_id, quantization_config=nf4_config)
56
+
57
  terminators = [
58
  tokenizer.eos_token_id,
59
  tokenizer.convert_tokens_to_ids("<|eot_id|>")