aashish1904
commited on
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
|
4 |
+
license: apache-2.0
|
5 |
+
pipeline_tag: text-generation
|
6 |
+
language:
|
7 |
+
- ja
|
8 |
+
- en
|
9 |
+
tags:
|
10 |
+
- japanese
|
11 |
+
- mistral
|
12 |
+
inference: false
|
13 |
+
base_model: mistralai/Mistral-Nemo-Base-2407
|
14 |
+
|
15 |
+
---
|
16 |
+
|
17 |
+
![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)
|
18 |
+
|
19 |
+
# QuantFactory/Mistral-Nemo-Japanese-Instruct-2408-GGUF
|
20 |
+
This is quantized version of [cyberagent/Mistral-Nemo-Japanese-Instruct-2408](https://huggingface.co/cyberagent/Mistral-Nemo-Japanese-Instruct-2408) created using llama.cpp
|
21 |
+
|
22 |
+
# Original Model Card
|
23 |
+
|
24 |
+
# Mistral-Nemo-Japanese-Instruct-2408
|
25 |
+
|
26 |
+
## Model Description
|
27 |
+
|
28 |
+
This is a Japanese continually pre-trained model based on [mistralai/Mistral-Nemo-Instruct-2407](https://huggingface.co/mistralai/Mistral-Nemo-Instruct-2407).
|
29 |
+
|
30 |
+
## Usage
|
31 |
+
|
32 |
+
Make sure to update your transformers installation via `pip install --upgrade transformers`.
|
33 |
+
|
34 |
+
```python
|
35 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
|
36 |
+
|
37 |
+
model = AutoModelForCausalLM.from_pretrained("cyberagent/Mistral-Nemo-Japanese-Instruct-2408", device_map="auto", torch_dtype="auto")
|
38 |
+
tokenizer = AutoTokenizer.from_pretrained("cyberagent/Mistral-Nemo-Japanese-Instruct-2408")
|
39 |
+
streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
|
40 |
+
|
41 |
+
messages = [
|
42 |
+
{"role": "system", "content": "あなたは親切なAIアシスタントです。"},
|
43 |
+
{"role": "user", "content": "AIによって私たちの暮らしはどのように変わりますか?"}
|
44 |
+
]
|
45 |
+
|
46 |
+
input_ids = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
|
47 |
+
output_ids = model.generate(input_ids,
|
48 |
+
max_new_tokens=1024,
|
49 |
+
temperature=0.5,
|
50 |
+
streamer=streamer)
|
51 |
+
```
|
52 |
+
|
53 |
+
## Prompt Format
|
54 |
+
ChatML Format
|
55 |
+
```
|
56 |
+
<s><|im_start|>system
|
57 |
+
あなたは親切なAIアシスタントです。<|im_end|>
|
58 |
+
<|im_start|>user
|
59 |
+
AIによって私たちの暮らしはどのように変わりますか?<|im_end|>
|
60 |
+
<|im_start|>assistant
|
61 |
+
|
62 |
+
|
63 |
+
```
|
64 |
+
|
65 |
+
## License
|
66 |
+
Apache-2.0
|
67 |
+
|
68 |
+
## Author
|
69 |
+
|
70 |
+
[Ryosuke Ishigami](https://huggingface.co/rishigami)
|
71 |
+
|
72 |
+
## How to cite
|
73 |
+
|
74 |
+
```tex
|
75 |
+
@misc{cyberagent-mistral-nemo-japanese-instruct-2408,
|
76 |
+
title={Mistral-Nemo-Japanese-Instruct-2408},
|
77 |
+
url={https://huggingface.co/cyberagent/Mistral-Nemo-Japanese-Instruct-2408},
|
78 |
+
author={Ryosuke Ishigami},
|
79 |
+
year={2024},
|
80 |
+
}
|
81 |
+
```
|