Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,13 +8,11 @@ import torch
|
|
| 8 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
| 9 |
|
| 10 |
DESCRIPTION = """\
|
| 11 |
-
#
|
| 12 |
|
| 13 |
-
|
| 14 |
-
This is a demo of [`google/gemma-2-9b-it`](https://huggingface.co/google/gemma-2-9b-it), fine-tuned for instruction following.
|
| 15 |
-
For more details, please check [our post](https://huggingface.co/blog/gemma2).
|
| 16 |
|
| 17 |
-
|
| 18 |
"""
|
| 19 |
|
| 20 |
MAX_MAX_NEW_TOKENS = 2048
|
|
@@ -23,7 +21,7 @@ MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
|
| 23 |
|
| 24 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
| 25 |
|
| 26 |
-
model_id = "
|
| 27 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 28 |
model = AutoModelForCausalLM.from_pretrained(
|
| 29 |
model_id,
|
|
|
|
| 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 |
+
Gemma2 9B 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 |
|
| 22 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
| 23 |
|
| 24 |
+
model_id = "GoToCompany/gemma2-9b-cpt-sahabatai-v1-instruct"
|
| 25 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 26 |
model = AutoModelForCausalLM.from_pretrained(
|
| 27 |
model_id,
|