metastable-void
commited on
update adapter model
Browse files
README.md
CHANGED
|
@@ -6,7 +6,7 @@ colorTo: purple
|
|
| 6 |
python_version: 3.11
|
| 7 |
models:
|
| 8 |
- llm-jp/llm-jp-3-1.8b-instruct
|
| 9 |
-
- vericava/llm-jp-3-1.8b-instruct-lora-
|
| 10 |
sdk: gradio
|
| 11 |
sdk_version: 5.23.1
|
| 12 |
app_file: app.py
|
|
|
|
| 6 |
python_version: 3.11
|
| 7 |
models:
|
| 8 |
- llm-jp/llm-jp-3-1.8b-instruct
|
| 9 |
+
- vericava/llm-jp-3-1.8b-instruct-lora-vericava17
|
| 10 |
sdk: gradio
|
| 11 |
sdk_version: 5.23.1
|
| 12 |
app_file: app.py
|
app.py
CHANGED
|
@@ -21,7 +21,7 @@ MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "32768"))
|
|
| 21 |
|
| 22 |
|
| 23 |
if torch.cuda.is_available():
|
| 24 |
-
model_id = "vericava/llm-jp-3-1.8b-instruct-lora-
|
| 25 |
base_model_id = "llm-jp/llm-jp-3-1.8b-instruct"
|
| 26 |
tokenizer = AutoTokenizer.from_pretrained(base_model_id, trust_remote_code=True)
|
| 27 |
tokenizer.chat_template = "{{bos_token}}{% for message in messages %}{% if message['role'] == 'user' %}{{ '\\n\\n### 前の投稿:\\n' + message['content'] + '' }}{% elif message['role'] == 'system' %}{{ '以下は、SNS上の投稿です。あなたはSNSの投稿生成botとして、次に続く投稿を考えなさい。説明はせず、投稿の内容のみを鉤括弧をつけずに答えよ。' }}{% elif message['role'] == 'assistant' %}{{ '\\n\\n### 次の投稿:\\n' + message['content'] + eos_token }}{% endif %}{% if loop.last and add_generation_prompt %}{{ '\\n\\n### 次の投稿:\\n' }}{% endif %}{% endfor %}"
|
|
|
|
| 21 |
|
| 22 |
|
| 23 |
if torch.cuda.is_available():
|
| 24 |
+
model_id = "vericava/llm-jp-3-1.8b-instruct-lora-vericava17"
|
| 25 |
base_model_id = "llm-jp/llm-jp-3-1.8b-instruct"
|
| 26 |
tokenizer = AutoTokenizer.from_pretrained(base_model_id, trust_remote_code=True)
|
| 27 |
tokenizer.chat_template = "{{bos_token}}{% for message in messages %}{% if message['role'] == 'user' %}{{ '\\n\\n### 前の投稿:\\n' + message['content'] + '' }}{% elif message['role'] == 'system' %}{{ '以下は、SNS上の投稿です。あなたはSNSの投稿生成botとして、次に続く投稿を考えなさい。説明はせず、投稿の内容のみを鉤括弧をつけずに答えよ。' }}{% elif message['role'] == 'assistant' %}{{ '\\n\\n### 次の投稿:\\n' + message['content'] + eos_token }}{% endif %}{% if loop.last and add_generation_prompt %}{{ '\\n\\n### 次の投稿:\\n' }}{% endif %}{% endfor %}"
|