FlawedLLM commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,14 +30,11 @@ from huggingface_hub import login, HfFolder
|
|
| 30 |
# model = AutoModelForCausalLM.from_pretrained(model_name_or_path, load_in_8bit=True, device_map='auto')
|
| 31 |
# model = PeftModel.from_pretrained(model, lora_weights)
|
| 32 |
# Load model directly
|
| 33 |
-
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 34 |
|
| 35 |
-
tokenizer = AutoTokenizer.from_pretrained("FlawedLLM/Bhashini_gemma_merged4bit_clean_final"
|
| 36 |
model = AutoModelForCausalLM.from_pretrained("FlawedLLM/Bhashini_gemma_merged4bit_clean_final",
|
| 37 |
-
device_map="auto"
|
| 38 |
-
torch_dtype =torch.float16,
|
| 39 |
-
low_cpu_mem_usage=True,
|
| 40 |
-
trust_remote_code=True)
|
| 41 |
# alpaca_prompt = You MUST copy from above!
|
| 42 |
@spaces.GPU(duration=300)
|
| 43 |
def chunk_it(input_command, item_list):
|
|
|
|
| 30 |
# model = AutoModelForCausalLM.from_pretrained(model_name_or_path, load_in_8bit=True, device_map='auto')
|
| 31 |
# model = PeftModel.from_pretrained(model, lora_weights)
|
| 32 |
# Load model directly
|
| 33 |
+
# from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 34 |
|
| 35 |
+
tokenizer = AutoTokenizer.from_pretrained("FlawedLLM/Bhashini_gemma_merged4bit_clean_final")
|
| 36 |
model = AutoModelForCausalLM.from_pretrained("FlawedLLM/Bhashini_gemma_merged4bit_clean_final",
|
| 37 |
+
device_map="auto")
|
|
|
|
|
|
|
|
|
|
| 38 |
# alpaca_prompt = You MUST copy from above!
|
| 39 |
@spaces.GPU(duration=300)
|
| 40 |
def chunk_it(input_command, item_list):
|