Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,11 +8,7 @@ import torch
|
|
| 8 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
| 9 |
|
| 10 |
DESCRIPTION = """\
|
| 11 |
-
# Sahabat-AI
|
| 12 |
|
| 13 |
-
Sahabat-AI (Indonesian language for “close friends”) is a collection of Large Language Models (LLMs) which has been pretrained and instruct-tuned for Indonesian language and its various dialects. Sahabat-AI ecosystem is co-initiated by Indonesian tech and telecommunication companies: GoTo Group and Indosat Ooredoo Hutchison.
|
| 14 |
-
|
| 15 |
-
Llama3 8B CPT Sahabat-AI v1 Instruct is an Indonesian-focused model which has been fine-tuned with around 448,000 Indonesian instruction-completion pairs alongside an Indonesian-dialect pool consisting of 96,000 instruction-completion pairs in Javanese and 98,000 instruction-completion pairs in Sundanese. Additionally, we added a pool of 129,000 instruction-completion pairs in English.
|
| 16 |
"""
|
| 17 |
|
| 18 |
MAX_MAX_NEW_TOKENS = 2048
|
|
@@ -21,7 +17,7 @@ MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
|
| 21 |
|
| 22 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
| 23 |
|
| 24 |
-
model_id = "gmonsoon/
|
| 25 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 26 |
model = AutoModelForCausalLM.from_pretrained(
|
| 27 |
model_id,
|
|
|
|
| 8 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
| 9 |
|
| 10 |
DESCRIPTION = """\
|
|
|
|
| 11 |
|
|
|
|
|
|
|
|
|
|
| 12 |
"""
|
| 13 |
|
| 14 |
MAX_MAX_NEW_TOKENS = 2048
|
|
|
|
| 17 |
|
| 18 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
| 19 |
|
| 20 |
+
model_id = "gmonsoon/SahabatAI-MediChatIndo-8B-v2"
|
| 21 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 22 |
model = AutoModelForCausalLM.from_pretrained(
|
| 23 |
model_id,
|