aashish1904 commited on
Commit
f561314
1 Parent(s): b15269b

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +116 -0
README.md ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+
4
+ base_model:
5
+ - meta-llama/Meta-Llama-3.1-8B-Instruct
6
+ - elyza/Llama-3-ELYZA-JP-8B
7
+ - nvidia/Llama3-ChatQA-1.5-8B
8
+ library_name: transformers
9
+ tags:
10
+ - mergekit
11
+ - merge
12
+ language:
13
+ - ja
14
+ license: llama3
15
+
16
+ ---
17
+
18
+ ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)
19
+
20
+ # QuantFactory/Llama3.1-ArrowSE-v0.4-GGUF
21
+ This is quantized version of [DataPilot/Llama3.1-ArrowSE-v0.4](https://huggingface.co/DataPilot/Llama3.1-ArrowSE-v0.4) created using llama.cpp
22
+
23
+ # Original Model Card
24
+
25
+
26
+ ## 概要 
27
+
28
+ このモデルはllama3.1-8B-instructをもとに日本語性能を高めることを目的にMergekit&ファインチューニングを用いて作成されました。
29
+
30
+ meta,ELYZA,nvidiaの皆様に感謝します。
31
+
32
+ ## how to use
33
+
34
+
35
+ ```python
36
+ import torch
37
+ from transformers import AutoModelForCausalLM, AutoTokenizer
38
+
39
+ DEFAULT_SYSTEM_PROMPT = "あなたは誠実で優秀な日本人のアシスタントです。特に指示が無い場合は、常に日本語で回答してください。"
40
+ text = "Vtuberとして成功するために大切な5つのことを小学生にでもわかるように教えてください。"
41
+
42
+ model_name = "DataPilot/Llama3.1-ArrowSE-v0.4"
43
+
44
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
45
+ model = AutoModelForCausalLM.from_pretrained(
46
+ model_name,
47
+ torch_dtype="auto",
48
+ device_map="auto",
49
+ )
50
+ model.eval()
51
+
52
+ messages = [
53
+ {"role": "system", "content": DEFAULT_SYSTEM_PROMPT},
54
+ {"role": "user", "content": text},
55
+ ]
56
+ prompt = tokenizer.apply_chat_template(
57
+ messages,
58
+ tokenize=False,
59
+ add_generation_prompt=True
60
+ )
61
+ token_ids = tokenizer.encode(
62
+ prompt, add_special_tokens=False, return_tensors="pt"
63
+ )
64
+
65
+ with torch.no_grad():
66
+ output_ids = model.generate(
67
+ token_ids.to(model.device),
68
+ max_new_tokens=1200,
69
+ do_sample=True,
70
+ temperature=0.6,
71
+ top_p=0.9,
72
+ )
73
+ output = tokenizer.decode(
74
+ output_ids.tolist()[0][token_ids.size(1):], skip_special_tokens=True
75
+ )
76
+ print(output)
77
+ ```
78
+
79
+
80
+ ## merge
81
+
82
+ This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit).
83
+
84
+ ## Merge Details
85
+ ### Merge Method
86
+
87
+ This model was merged using the [TIES](https://arxiv.org/abs/2306.01708) merge method using meta-llama/Meta-Llama-3.1-8B-Instruct as a base.
88
+
89
+ ### Models Merged
90
+
91
+ The following models were included in the merge:
92
+ * [meta-llama/Meta-Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct)
93
+ * [elyza/Llama-3-ELYZA-JP-8B](https://huggingface.co/elyza/Llama-3-ELYZA-JP-8B)
94
+ * [nvidia/Llama3-ChatQA-1.5-8B](https://huggingface.co/nvidia/Llama3-ChatQA-1.5-8B)
95
+
96
+ ### Configuration
97
+
98
+ The following YAML configuration was used to produce this model:
99
+
100
+ ```yaml
101
+ models:
102
+ - model: meta-llama/Meta-Llama-3.1-8B-Instruct
103
+ parameters:
104
+ weight: 1
105
+ - model: elyza/Llama-3-ELYZA-JP-8B
106
+ parameters:
107
+ weight: 0.7
108
+ - model: nvidia/Llama3-ChatQA-1.5-8B
109
+ parameters:
110
+ weight: 0.15
111
+ merge_method: ties
112
+ base_model: meta-llama/Meta-Llama-3.1-8B-Instruct
113
+ parameters:
114
+ normalize: false
115
+ dtype: bfloat16
116
+ ```