|
--- |
|
license: mit |
|
language: |
|
- ja |
|
- en |
|
base_model: |
|
- sbintuitions/sarashina2.2-3b-instruct-v0.1 |
|
pipeline_tag: text-generation |
|
--- |
|
|
|
# DataPilot/ArrowNeo-Neko-3B-coder |
|
|
|
## overview |
|
|
|
このモデルはSB intuitionsの[sarashina-2.2-instruct-v0.1](https://huggingface.co/sbintuitions/sarashina2.2-3b-instruct-v0.1)をベースにUnslothを用いてコーディングモデル用にチューニングしました。 |
|
## How to use |
|
|
|
以下のコードでこのモデルを動かすことができます。 |
|
```python |
|
import torch |
|
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline, set_seed |
|
|
|
# モデルのロード |
|
model_name = "DataPilot/ArrowNeo-Neko-3B-coder" |
|
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto") |
|
tokenizer = AutoTokenizer.from_pretrained(model_name) |
|
chat_pipeline = pipeline("text-generation", model=model, tokenizer=tokenizer) |
|
set_seed(123) |
|
|
|
# ユーザーの入力 |
|
user_input = [{"role": "user", "content": "こんにちは。Pythonを用いてstrawberryのRをカウントするコードを書いて下さい。"}] |
|
|
|
# モデルによる応答生成 |
|
responses = chat_pipeline( |
|
user_input, |
|
max_length=50, |
|
do_sample=True, |
|
num_return_sequences=2, |
|
) |
|
|
|
# 応答を表示 |
|
for i, response in enumerate(responses, 1): |
|
print(f"Response {i}: {response['generated_text']}") |
|
``` |
|
|
|
## Limitations |
|
|
|
このモデルには、安全トレーニングが制限されています。 |
|
したがって、いくつかの無意味なシーケンス、いくつかの不正確なインスタンス、または偏った/不快な出力を生成する可能性があります。 |
|
使用する前に、開発者は人間の好みと安全上の考慮事項に基づいてモデルを調整していただきたいと思います。 |
|
|
|
## License |
|
|
|
MIT license |
|
このモデルのライセンスは[元モデルのライセンス](https://huggingface.co/sbintuitions/sarashina2.2-3b-instruct-v0.1/blob/main/LICENSE)に準拠します。 |
|
|
|
|