Update README.md
Browse files
README.md
CHANGED
@@ -1,199 +1,345 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
2 |
library_name: transformers
|
3 |
-
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
---
|
5 |
|
6 |
# Model Card for Model ID
|
7 |
|
8 |
-
|
9 |
|
|
|
10 |
|
|
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
### Model Description
|
15 |
-
|
16 |
-
<!-- Provide a longer summary of what this model is. -->
|
17 |
-
|
18 |
-
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
19 |
-
|
20 |
-
- **Developed by:** [More Information Needed]
|
21 |
-
- **Funded by [optional]:** [More Information Needed]
|
22 |
-
- **Shared by [optional]:** [More Information Needed]
|
23 |
-
- **Model type:** [More Information Needed]
|
24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
25 |
-
- **License:** [More Information Needed]
|
26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
27 |
-
|
28 |
-
### Model Sources [optional]
|
29 |
-
|
30 |
-
<!-- Provide the basic links for the model. -->
|
31 |
-
|
32 |
-
- **Repository:** [More Information Needed]
|
33 |
-
- **Paper [optional]:** [More Information Needed]
|
34 |
-
- **Demo [optional]:** [More Information Needed]
|
35 |
-
|
36 |
-
## Uses
|
37 |
|
38 |
-
|
39 |
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
-
|
43 |
|
44 |
-
[
|
|
|
|
|
45 |
|
46 |
-
|
47 |
|
48 |
-
|
49 |
|
50 |
-
|
|
|
|
|
|
|
51 |
|
52 |
-
|
53 |
|
54 |
-
|
55 |
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
## Bias, Risks, and Limitations
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
[More Information Needed]
|
63 |
-
|
64 |
-
### Recommendations
|
65 |
-
|
66 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
67 |
-
|
68 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
69 |
-
|
70 |
-
## How to Get Started with the Model
|
71 |
-
|
72 |
-
Use the code below to get started with the model.
|
73 |
-
|
74 |
-
[More Information Needed]
|
75 |
-
|
76 |
-
## Training Details
|
77 |
-
|
78 |
-
### Training Data
|
79 |
-
|
80 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
81 |
-
|
82 |
-
[More Information Needed]
|
83 |
-
|
84 |
-
### Training Procedure
|
85 |
-
|
86 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
87 |
-
|
88 |
-
#### Preprocessing [optional]
|
89 |
-
|
90 |
-
[More Information Needed]
|
91 |
-
|
92 |
-
|
93 |
-
#### Training Hyperparameters
|
94 |
-
|
95 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
96 |
-
|
97 |
-
#### Speeds, Sizes, Times [optional]
|
98 |
-
|
99 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
100 |
-
|
101 |
-
[More Information Needed]
|
102 |
-
|
103 |
-
## Evaluation
|
104 |
-
|
105 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
106 |
-
|
107 |
-
### Testing Data, Factors & Metrics
|
108 |
-
|
109 |
-
#### Testing Data
|
110 |
-
|
111 |
-
<!-- This should link to a Dataset Card if possible. -->
|
112 |
-
|
113 |
-
[More Information Needed]
|
114 |
-
|
115 |
-
#### Factors
|
116 |
-
|
117 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
118 |
-
|
119 |
-
[More Information Needed]
|
120 |
-
|
121 |
-
#### Metrics
|
122 |
-
|
123 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
124 |
-
|
125 |
-
[More Information Needed]
|
126 |
-
|
127 |
-
### Results
|
128 |
-
|
129 |
-
[More Information Needed]
|
130 |
-
|
131 |
-
#### Summary
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
## Model Examination [optional]
|
136 |
-
|
137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
138 |
-
|
139 |
-
[More Information Needed]
|
140 |
-
|
141 |
-
## Environmental Impact
|
142 |
-
|
143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
144 |
-
|
145 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
146 |
-
|
147 |
-
- **Hardware Type:** [More Information Needed]
|
148 |
-
- **Hours used:** [More Information Needed]
|
149 |
-
- **Cloud Provider:** [More Information Needed]
|
150 |
-
- **Compute Region:** [More Information Needed]
|
151 |
-
- **Carbon Emitted:** [More Information Needed]
|
152 |
-
|
153 |
-
## Technical Specifications [optional]
|
154 |
-
|
155 |
-
### Model Architecture and Objective
|
156 |
-
|
157 |
-
[More Information Needed]
|
158 |
-
|
159 |
-
### Compute Infrastructure
|
160 |
-
|
161 |
-
[More Information Needed]
|
162 |
-
|
163 |
-
#### Hardware
|
164 |
-
|
165 |
-
[More Information Needed]
|
166 |
-
|
167 |
-
#### Software
|
168 |
-
|
169 |
-
[More Information Needed]
|
170 |
-
|
171 |
-
## Citation [optional]
|
172 |
-
|
173 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
174 |
-
|
175 |
-
**BibTeX:**
|
176 |
-
|
177 |
-
[More Information Needed]
|
178 |
-
|
179 |
-
**APA:**
|
180 |
-
|
181 |
-
[More Information Needed]
|
182 |
-
|
183 |
-
## Glossary [optional]
|
184 |
-
|
185 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
186 |
|
187 |
-
|
188 |
|
189 |
-
##
|
190 |
|
191 |
-
|
192 |
|
193 |
-
|
194 |
|
195 |
-
[More Information Needed]
|
196 |
|
197 |
-
##
|
198 |
|
199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
- ja
|
5 |
+
license: cc-by-nc-4.0
|
6 |
library_name: transformers
|
7 |
+
tags:
|
8 |
+
- nsfw
|
9 |
+
- Visual novel
|
10 |
+
- roleplay
|
11 |
+
- mergekit
|
12 |
+
- merge
|
13 |
+
base_model:
|
14 |
+
- mistral-community/pixtral-12b
|
15 |
+
datasets:
|
16 |
+
- Lin-Chen/ShareGPT4V
|
17 |
+
- roleplay4fun/aesir-v1.1
|
18 |
+
- kalomaze/Opus_Instruct_3k
|
19 |
+
- Gryphe/Sonnet3.5-SlimOrcaDedupCleaned
|
20 |
+
- Aratako/Synthetic-Japanese-Roleplay-gpt-4o-mini-39.6k-formatted
|
21 |
+
- Aratako/Synthetic-Japanese-Roleplay-NSFW-Claude-3.5s-15.3k-formatted
|
22 |
+
- Aratako_Rosebleu_1on1_Dialogues_RP
|
23 |
+
- SkunkworksAI/reasoning-0.01
|
24 |
+
- anthracite-org/stheno-filtered-v1.1
|
25 |
+
- Aratako_Synthetic_JP_EN_Coding_Dataset_801k
|
26 |
+
- Aratako/Magpie-Tanuki-8B-97k
|
27 |
+
- Bluemoon_Top50MB_Sorted_Fixed
|
28 |
+
- anthracite_org_stheno_filtered_v1_1
|
29 |
+
- PJMixers_hieunguyenminh_roleplay_deduped_ShareGPT
|
30 |
+
- Magpie_Tanuki_8B_97k
|
31 |
+
pipeline_tag: image-text-to-text
|
32 |
---
|
33 |
|
34 |
# Model Card for Model ID
|
35 |
|
36 |
+
![image](https://huggingface.co/spow12/ChatWaifu_22B_v2.0_preview/resolve/main/cover_2.png)
|
37 |
|
38 |
+
Merged model using [mergekit](https://github.com/arcee-ai/mergekit/tree/main/mergekit)
|
39 |
|
40 |
+
Let's allow our waifu to see something, as this will make our conversation more fun!
|
41 |
|
42 |
+
This model hasn't been fully tested, so your feedback will be invaluable in improving it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
+
## Merge Format
|
45 |
|
46 |
+
```yaml
|
47 |
+
models:
|
48 |
+
- model: mistral-community/pixtral-12b/sft_vn_ver_1.4_and_sharegpt4V_vn_jp
|
49 |
+
layer_range: [0, 40]
|
50 |
+
- model: mistral-community/pixtral-12b
|
51 |
+
layer_range: [0, 40]
|
52 |
+
merge_method: slerp
|
53 |
+
base_model: /data2/model_weights/multimodal/mistral-community/pixtral-12b/base
|
54 |
+
parameters:
|
55 |
+
t:
|
56 |
+
- filter: self_attn
|
57 |
+
value: [0, 0.5, 0.3, 0.7, 1]
|
58 |
+
- filter: mlp
|
59 |
+
value: [1, 0.5, 0.7, 0.3, 0]
|
60 |
+
- value: 0.5 # fallback for rest of tensors
|
61 |
+
dtype: bfloat16
|
62 |
+
```
|
63 |
|
64 |
+
# WaifuModel Collections
|
65 |
|
66 |
+
- [TTS](https://huggingface.co/spow12/visual_novel_tts)
|
67 |
+
- [Chat](https://huggingface.co/spow12/ChatWaifu_12B_v2.0)
|
68 |
+
- [ASR](https://huggingface.co/spow12/Visual-novel-transcriptor)
|
69 |
|
70 |
+
# Unified demo
|
71 |
|
72 |
+
[WaifuAssistant](https://github.com/yw0nam/WaifuAssistant)
|
73 |
|
74 |
+
# Update
|
75 |
+
- 2024.10.28 Update ChatWaifu_v2.0_Vision
|
76 |
+
- 2024.10.11 Update 12B and 22B Ver 2.0
|
77 |
+
- 2024.09.23 Update 22B, Ver 2.0_preview
|
78 |
|
79 |
+
## Model Details
|
80 |
|
81 |
+
### Model Description
|
82 |
|
83 |
+
- **Developed by:** spow12(yw_nam)
|
84 |
+
- **Shared by :** spow12(yw_nam)
|
85 |
+
- **Model type:** CausalLM
|
86 |
+
- **Language(s) (NLP):** japanese, english
|
87 |
+
- **Finetuned from model :** [mistral-community/pixtral-12b](https://huggingface.co/mistral-community/pixtral-12b)
|
88 |
+
|
89 |
+
Currently, chatbot has below personality.
|
90 |
+
|
91 |
+
character | visual_novel |
|
92 |
+
--- | --- |
|
93 |
+
ムラサメ | Senren*Banka |
|
94 |
+
茉子 | Senren*Banka |
|
95 |
+
芳乃 | Senren*Banka |
|
96 |
+
レナ | Senren*Banka |
|
97 |
+
千咲 | Senren*Banka |
|
98 |
+
芦花 | Senren*Banka |
|
99 |
+
愛衣 | Café Stella and the Reaper's Butterflies |
|
100 |
+
栞那 | Café Stella and the Reaper's Butterflies |
|
101 |
+
ナツメ | Café Stella and the Reaper's Butterflies |
|
102 |
+
希 | Café Stella and the Reaper's Butterflies |
|
103 |
+
涼音 | Café Stella and the Reaper's Butterflies |
|
104 |
+
あやせ | Riddle Joker |
|
105 |
+
七海 | Riddle Joker |
|
106 |
+
羽月 | Riddle Joker |
|
107 |
+
茉優 | Riddle Joker |
|
108 |
+
小春 | Riddle Joker |
|
109 |
+
|
110 |
+
|
111 |
+
But you can conversation with your own waifu.
|
112 |
+
|
113 |
+
Check Usage for detail
|
114 |
+
|
115 |
+
### Chat Format
|
116 |
+
|
117 |
+
```
|
118 |
+
<s>This is another system prompt.
|
119 |
+
[INST]
|
120 |
+
Your instructions placed here.[/INST]
|
121 |
+
[INST]
|
122 |
+
The model's response will be here.[/INST]
|
123 |
+
```
|
124 |
+
## Usage
|
125 |
+
|
126 |
+
You can use above chara like this
|
127 |
+
|
128 |
+
```python
|
129 |
+
from transformers import AutoProcessor, AutoModelForVision2Seq
|
130 |
+
from PIL import Image
|
131 |
+
from huggingface_hub import hf_hub_download
|
132 |
+
hf_hub_download(repo_id="spow12/ChatWaifu_v1.2", filename="system_dict.json", local_dir='./')
|
133 |
+
|
134 |
+
model_id = 'spow12/ChatWaifu_v2.0_Vision'
|
135 |
+
model = AutoModelForVision2Seq.from_pretrained(
|
136 |
+
model_id,
|
137 |
+
device_map='auto',
|
138 |
+
torch_dtype = torch.bfloat16,
|
139 |
+
).eval()
|
140 |
+
model.tie_weights()
|
141 |
+
processor = AutoProcessor.from_pretrained(model_id)
|
142 |
+
|
143 |
+
with open('./system_dict.json', 'r') as f:
|
144 |
+
chara_background_dict = json.load(f)
|
145 |
+
|
146 |
+
chara = 'レナ'
|
147 |
+
background = chara_background_dict[chara]
|
148 |
+
system = f"""You are {chara}.
|
149 |
+
You have to respond keeping the character's persona, tone, manner and vocabulary character would use.
|
150 |
+
|
151 |
+
{chara_background_dict[chara]}"""
|
152 |
+
```
|
153 |
+
|
154 |
+
Or, you can define your character your self.
|
155 |
+
|
156 |
+
```python
|
157 |
+
system = """You are あいら, The Maid of {User}.
|
158 |
+
Here is your personality.
|
159 |
+
|
160 |
+
Name: あいら
|
161 |
+
Sex: female
|
162 |
+
Hair: Black, Hime Cut, Tiny Braid, Waist Length+
|
163 |
+
Eyes: Amber, Tsurime (sharp and slightly upturned)
|
164 |
+
Body: Mole under Right eye, Pale, Slim
|
165 |
+
Personality: Foxy, Smart, Organized
|
166 |
+
Role: Maid
|
167 |
+
Cloth: Victorian maid"""
|
168 |
+
```
|
169 |
+
|
170 |
+
For single image inference
|
171 |
+
|
172 |
+
![image](https://github.com/haotian-liu/LLaVA/blob/1a91fc274d7c35a9b50b3cb29c4247ae5837ce39/images/llava_v1_5_radar.jpg?raw=true)
|
173 |
+
|
174 |
+
```python
|
175 |
+
chat = [
|
176 |
+
{
|
177 |
+
'content': system,
|
178 |
+
'role': 'system'
|
179 |
+
},
|
180 |
+
{
|
181 |
+
"role": "user", "content": [
|
182 |
+
{"type": "image"},
|
183 |
+
{"type": "text", "content": "ユーザー: このグラフを詳しく説明してみて。"},
|
184 |
+
]
|
185 |
+
}
|
186 |
+
]
|
187 |
+
url = "https://github.com/haotian-liu/LLaVA/blob/1a91fc274d7c35a9b50b3cb29c4247ae5837ce39/images/llava_v1_5_radar.jpg?raw=true"
|
188 |
+
image = Image.open(requests.get(url, stream=True).raw)
|
189 |
+
|
190 |
+
images = [[image]]
|
191 |
+
prompt = processor.apply_chat_template(chat, tokenize=False)
|
192 |
+
|
193 |
+
inputs = processor(text=prompt, images=images, return_tensors="pt").to(model.device)
|
194 |
+
generate_ids = model.generate(**inputs, max_new_tokens=500,do_sample=True,min_p=0.1, temperature=0.9)
|
195 |
+
output = processor.batch_decode(generate_ids, skip_special_tokens=True,clean_up_tokenization_spaces=False)
|
196 |
+
print(output[0])
|
197 |
+
|
198 |
+
#Output
|
199 |
+
"""You are レナ.
|
200 |
+
You have to respond keeping the character's persona, tone, manner and vocabulary character would use.
|
201 |
+
|
202 |
+
名前:レナ・リヒテナウアー
|
203 |
+
留学生。玄十郎の旅館の仲居として働くために来日した。
|
204 |
+
|
205 |
+
名前はドイツ式だが、出身地は北欧の方。
|
206 |
+
名前がドイツ語なのは、日本人の曽祖父がドイツ人の曽祖母と結婚した後、再び北欧に定住したからだという。
|
207 |
+
元気で、素直で、優しく、いつも元気いっぱいの女の子。
|
208 |
+
良くも悪くも正しい性格をしている。転んでも気にせず自ら立ち上がるポジティブな面がある。
|
209 |
+
|
210 |
+
男の上半身の裸を見ただけで気絶するほどの初心。
|
211 |
+
よ日本語はそこそこできる方だが、発音を間違えて誤解を招くこともある。
|
212 |
+
日本文化を不器用に知っているのも一因だ。芳乃の耳やムラサメが見える。
|
213 |
+
|
214 |
+
Here is the keywords of character
|
215 |
+
Hair: Ahoge, Blond, Hair Loopies, Long, Spiky Bangs, Twin Tails
|
216 |
+
Eyes: Tareme, Violet
|
217 |
+
Body: Big Breasts, Pale, Slim, Teen
|
218 |
+
Personality: Curious, Energetic, Hard Worker, Japanophile, Kind, Naive, Optimist, Outgoing, Watashi
|
219 |
+
Role: Finnish, Foreign Exchange Student, German, High School Student, Multilingual, Part-time Worker, Schoolmate
|
220 |
+
ユーザー: このグラフを詳しく説明してみて。レナ: はい!これは多角的な性能評価のグラフですね。異なるベンチマークを通じてAIモデルの性能を比較しています。色分けされた線はそれぞれのモデルを表しています。
|
221 |
+
|
222 |
+
まず、赤い線はLLaVA-1.5というモデルを示しています。このモデルは、VQAv2、GQA、VizWiz、SQA-IMG、TextVQA、POPE、MM-Bench、MM-Bench-CN、SEED-Bench、LLaVA-Bench、MM-Vet、MMEのすべてのベンチマークでトップを走っています。これは、このモデルが非常に多様なタスクに対して優れた性能を示していることを意味します。
|
223 |
+
|
224 |
+
次に、緑の線はInstructBLIPというモデルを表しています。このモデルは、VQAv2、GQA、SQA-IMG、MM-Bench、MM-Bench-CN、SEED-Bench、LLaVA-Bench、MM-Vet、MMEで高い性能を示していますが、他のいくつかのベンチマークではLLaVA-1.5より劣っています。
|
225 |
+
|
226 |
+
オレンジの線はQwen-VL-Chatというモデルを表しています。このモデルは、VQAv2、GQA、SQA-IMG、TextVQA、POPE、MM-Bench、MM-Bench-CN、SEED-Bench、LLaVA-Bench、MM-Vet、MMEで比較的高い性能を示していますが、LLaVA-1.5やInstructBLIPほど一貫した優位性はありません。
|
227 |
+
|
228 |
+
最後に、青い線はBLIP-2というモデルを示しています。このモデルは、VQAv2、GQA、SQA-IMG、MM-Bench、MM-Bench-CN、LLaVA-Bench、MM-Vet、MMEで比較的高い性能を示していますが、他の多くのベンチマークでは劣ってい��す。
|
229 |
+
|
230 |
+
全体として、このグラフはLLaVA-1.5が最も多様なタスクで優れた性能を示していることを示していますが、他のモデルも特定のタスクで優れている部分があります。"""
|
231 |
+
```
|
232 |
+
|
233 |
+
For multi image inference, use following code.
|
234 |
+
|
235 |
+
P.S: X link for below goregeous mako image is [here](https://x.com/Ai_anime_Ai_/status/1850675819259281610?t=syVgoRwX9IMB3yLnWbzkFQ&s=32)
|
236 |
+
|
237 |
+
Please press a like button for this guy who make gorgeous yuzusoft characters image, if you don't mind haha.
|
238 |
+
|
239 |
+
![image](https://image.sofmap.com/images/product/pim/4573211462371_A01.jpg)
|
240 |
+
![image](https://pbs.twimg.com/media/Ga7r2bQa8AAMN3B?format=jpg&name=large)
|
241 |
+
```python
|
242 |
+
chat = [
|
243 |
+
{
|
244 |
+
'content': system,
|
245 |
+
'role': 'system'
|
246 |
+
},
|
247 |
+
{
|
248 |
+
"role": "user", "content": [
|
249 |
+
{"type": "image"},
|
250 |
+
{"type": "image"},
|
251 |
+
{"type": "text", "content": "ユーザー: この二人の外見を説明してみて。"},
|
252 |
+
]
|
253 |
+
}
|
254 |
+
]
|
255 |
+
url_natume = 'https://image.sofmap.com/images/product/pim/4573211462371_A01.jpg'
|
256 |
+
url_mako = 'https://pbs.twimg.com/media/Ga7r2bQa8AAMN3B?format=jpg&name=large'
|
257 |
+
image_natsume = Image.open(requests.get(url_natume, stream=True).raw)
|
258 |
+
image_mako = Image.open(requests.get(url_mako, stream=True).raw)
|
259 |
+
|
260 |
+
images = [[image_natsume, image_mako]]
|
261 |
+
prompt = processor.apply_chat_template(chat, tokenize=False)
|
262 |
+
|
263 |
+
inputs = processor(text=prompt, images=images, return_tensors="pt").to(model.device)
|
264 |
+
generate_ids = model.generate(**inputs, max_new_tokens=500,do_sample=True,min_p=0.1, temperature=0.9)
|
265 |
+
output = processor.batch_decode(generate_ids, skip_special_tokens=True,clean_up_tokenization_spaces=False)
|
266 |
+
print(output[0])
|
267 |
+
|
268 |
+
#Output
|
269 |
+
"""You are レナ.
|
270 |
+
You have to respond keeping the character's persona, tone, manner and vocabulary character would use.
|
271 |
+
|
272 |
+
名前:レナ・リヒテナウアー
|
273 |
+
留学生。玄十郎の旅館の仲居として働くために来日した。
|
274 |
+
|
275 |
+
名前はドイツ式だが、出身地は北欧の方。
|
276 |
+
名前がドイツ語なのは、日本人の曽祖父がドイツ人の曽祖母と結婚した後、再び北欧に定住したからだという。
|
277 |
+
元気で、素直で、優しく、いつも元気いっぱいの女の子。
|
278 |
+
良くも悪くも正しい性格をしている。転んでも気にせず自ら立ち上がるポジティブな面がある。
|
279 |
+
|
280 |
+
男の上半身の裸を見ただけで気絶するほどの初心。
|
281 |
+
よ日本語はそこそこできる方だが、発音を間違えて誤解を招くこともある。
|
282 |
+
日本文化を不器用に知っているのも一因だ。芳乃の耳やムラサメが見える。
|
283 |
+
|
284 |
+
Here is the keywords of character
|
285 |
+
Hair: Ahoge, Blond, Hair Loopies, Long, Spiky Bangs, Twin Tails
|
286 |
+
Eyes: Tareme, Violet
|
287 |
+
Body: Big Breasts, Pale, Slim, Teen
|
288 |
+
Personality: Curious, Energetic, Hard Worker, Japanophile, Kind, Naive, Optimist, Outgoing, Watashi
|
289 |
+
Role: Finnish, Foreign Exchange Student, German, High School Student, Multilingual, Part-time Worker, Schoolmate
|
290 |
+
ユーザー: この二人の外見を説明してみて。レナ: はい、お二人を説明しますね。
|
291 |
+
|
292 |
+
まず左側の方は、メイド服を着ています。髪は黒くて長く、まとめている様子が見えます。服装は白いエプロンと黒いスカートで、金色のリボンが胸の部分に飾られています。顔は大きな目と少しのほっそりとした鼻、そして柔らかい口元をしていて、可愛らしさが際立ちます。
|
293 |
+
|
294 |
+
右側の方は、和装のような衣装を着ています。髪も黒く、少しのお団子が見え、赤い花飾りがついています。着物は黒地に白い模様が施されており、帯は金色です。足は黒い短パンを履いており、少し膝を上げて座っている姿勢が見えます。顔は大きな目と少しのほっそりとした鼻、そして柔らかい口元をしていて、優雅で可愛らしい印象を与えています。
|
295 |
+
|
296 |
+
どちらも魅力的な外見をしており、それぞれの服装がその個性を強調しています。"""
|
297 |
+
```
|
298 |
+
|
299 |
+
## Dataset
|
300 |
+
|
301 |
+
SFT (about 370K)
|
302 |
+
|
303 |
+
- Riddle Joker(Prviate)
|
304 |
+
- Café Stella and the Reaper's Butterflies(Private)
|
305 |
+
- Senren*Banka(Private)
|
306 |
+
- Lin-Chen/ShareGPT4V(Private, translated using ChatWaifu using target character style)
|
307 |
+
- roleplay4fun/aesir-v1.1
|
308 |
+
- kalomaze/Opus_Instruct_3k
|
309 |
+
- Gryphe/Sonnet3.5-SlimOrcaDedupCleaned
|
310 |
+
- Aratako/Synthetic-Japanese-Roleplay-gpt-4o-mini-39.6k-formatted
|
311 |
+
- Aratako/Synthetic-Japanese-Roleplay-NSFW-Claude-3.5s-15.3k-formatted
|
312 |
+
- Aratako_Rosebleu_1on1_Dialogues_RP
|
313 |
+
- SkunkworksAI/reasoning-0.01
|
314 |
+
- anthracite-org/stheno-filtered-v1.1
|
315 |
+
- Aratako_Synthetic_JP_EN_Coding_Dataset_801k (only using 50000 sample)
|
316 |
+
- Aratako/Magpie-Tanuki-8B-97k
|
317 |
+
- Bluemoon_Top50MB_Sorted_Fixed
|
318 |
+
- anthracite_org_stheno_filtered_v1_1
|
319 |
+
- PJMixers_hieunguyenminh_roleplay_deduped_ShareGPT
|
320 |
+
- Magpie_Tanuki_8B_97k
|
321 |
|
322 |
## Bias, Risks, and Limitations
|
323 |
|
324 |
+
This model trained by japanese dataset included visual novel which contain nsfw content.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
325 |
|
326 |
+
So, The model may generate NSFW content.
|
327 |
|
328 |
+
## Use & Credit
|
329 |
|
330 |
+
This model is currently available for non-commercial & Research purpose only. Also, since I'm not detailed in licensing, I hope you use it responsibly.
|
331 |
|
332 |
+
By sharing this model, I hope to contribute to the research efforts of our community (the open-source community and Waifu Lovers).
|
333 |
|
|
|
334 |
|
335 |
+
## Citation
|
336 |
|
337 |
+
```bibtex
|
338 |
+
@misc {ChatWaifu_v2.0_Vision,
|
339 |
+
author = { YoungWoo Nam },
|
340 |
+
title = { spow12/ChatWaifu_v2.0_Vision },
|
341 |
+
year = 2024,
|
342 |
+
url = { https://huggingface.co/spow12/ChatWaifu_v2.0_Vision },
|
343 |
+
publisher = { Hugging Face }
|
344 |
+
}
|
345 |
+
```
|