Update README.md and Add LICENSE
Browse files
LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
MIT License
|
2 |
+
|
3 |
+
Copyright (c) 2025 SB Intuitions
|
4 |
+
|
5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
+
of this software and associated documentation files (the "Software"), to deal
|
7 |
+
in the Software without restriction, including without limitation the rights
|
8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
+
copies of the Software, and to permit persons to whom the Software is
|
10 |
+
furnished to do so, subject to the following conditions:
|
11 |
+
|
12 |
+
The above copyright notice and this permission notice shall be included in all
|
13 |
+
copies or substantial portions of the Software.
|
14 |
+
|
15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
+
SOFTWARE.
|
README.md
CHANGED
@@ -1,9 +1,62 @@
|
|
1 |
---
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
-
|
6 |
-
|
|
|
7 |
---
|
8 |
|
9 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
license: mit
|
3 |
+
language:
|
4 |
+
- ja
|
5 |
+
pipeline_tag: text-generation
|
6 |
+
base_model:
|
7 |
+
- sbintuitions/sarashina2.2-0.5b
|
8 |
---
|
9 |
|
10 |
+
# sbintuitions/sarashina2.2-0.5b-instruct-v0.1
|
11 |
+
|
12 |
+
## Model Summary
|
13 |
+
|
14 |
+
This repository provides Japanese language models trained by [SB Intuitions](https://www.sbintuitions.co.jp/).
|
15 |
+
|
16 |
+
## Model Details
|
17 |
+
|
18 |
+
- Model type: Autoregressive Language Model
|
19 |
+
- Language(s): Japanese
|
20 |
+
|
21 |
+
## How to use
|
22 |
+
|
23 |
+
```python
|
24 |
+
import torch
|
25 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline, set_seed
|
26 |
+
|
27 |
+
# モデルのロード
|
28 |
+
model_name = "sbintuitions/sarashina2.2-0.5b-instruct-v0.1"
|
29 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto")
|
30 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
31 |
+
chat_pipeline = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
32 |
+
set_seed(123)
|
33 |
+
|
34 |
+
# ユーザーの入力
|
35 |
+
user_input = [{"role": "user", "content": "こんにちは。あなたの名前を教えて"}]
|
36 |
+
|
37 |
+
# モデルによる応答生成
|
38 |
+
responses = chat_pipeline(
|
39 |
+
user_input,
|
40 |
+
max_length=50,
|
41 |
+
do_sample=True,
|
42 |
+
num_return_sequences=3,
|
43 |
+
)
|
44 |
+
|
45 |
+
# 応答を表示
|
46 |
+
for i, response in enumerate(responses, 1):
|
47 |
+
print(f"Response {i}: {response['generated_text']}")
|
48 |
+
|
49 |
+
# Response 1: [{'role': 'user', 'content': 'こんにちは。あなたの名前を教えて'}, {'role': 'assistant', 'content': 'Sarashina2と言います。本日のご要件を教えて下さい。'}]
|
50 |
+
# Response 2: [{'role': 'user', 'content': 'こんにちは。あなたの名前を教えて'}, {'role': 'assistant', 'content': 'こんにちは!私の名前はSarashina2です。今日はどうしましたか?'}]
|
51 |
+
# Response 3: [{'role': 'user', 'content': 'こんにちは。あなたの名前を教えて'}, {'role': 'assistant', 'content': 'Sarashina2と言います。本日のご要件を教えて下さい。'}]
|
52 |
+
```
|
53 |
+
|
54 |
+
## Limitations
|
55 |
+
|
56 |
+
This model has limited safety training.
|
57 |
+
Therefore, it might generate some meaningless sequences, some inaccurate instances, or biased/objectionable outputs.
|
58 |
+
Before using it, we would like developers to tune models based on human preferences and safety considerations.
|
59 |
+
|
60 |
+
## License
|
61 |
+
|
62 |
+
MIT License
|