Spaces:
Runtime error
Runtime error
FlawedLLM
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -6,9 +6,11 @@ import spaces
|
|
6 |
import gradio as gr
|
7 |
import torch
|
8 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
|
9 |
|
10 |
tokenizer = AutoTokenizer.from_pretrained("FlawedLLM/Bhashini_gemma_merged4bit_clean_final")
|
11 |
model = AutoModelForCausalLM.from_pretrained("FlawedLLM/Bhashini_gemma_merged4bit_clean_final")
|
|
|
12 |
# alpaca_prompt = You MUST copy from above!
|
13 |
@spaces.GPU(duration=300)
|
14 |
def chunk_it(input_command, item_list):
|
|
|
6 |
import gradio as gr
|
7 |
import torch
|
8 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
9 |
+
from bitsandbytes.functional import quantize_blockwise
|
10 |
|
11 |
tokenizer = AutoTokenizer.from_pretrained("FlawedLLM/Bhashini_gemma_merged4bit_clean_final")
|
12 |
model = AutoModelForCausalLM.from_pretrained("FlawedLLM/Bhashini_gemma_merged4bit_clean_final")
|
13 |
+
model= quantize_blockwise(model)
|
14 |
# alpaca_prompt = You MUST copy from above!
|
15 |
@spaces.GPU(duration=300)
|
16 |
def chunk_it(input_command, item_list):
|