aashish1904 commited on
Commit
d3acb06
1 Parent(s): 976caf3

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +234 -0
README.md ADDED
@@ -0,0 +1,234 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+
4
+ license: apache-2.0
5
+ license_link: https://huggingface.co/Qwen/Qwen2.5-7B-Instruct/blob/main/LICENSE
6
+ language:
7
+ - en
8
+ pipeline_tag: text-generation
9
+ base_model: Qwen/Qwen2.5-7B
10
+ tags:
11
+ - chat
12
+
13
+ ---
14
+
15
+ [![QuantFactory Banner](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)](https://hf.co/QuantFactory)
16
+
17
+
18
+ # QuantFactory/Josiefied-Qwen2.5-7B-Instruct-abliterated-GGUF
19
+ This is quantized version of [Goekdeniz-Guelmez/Josiefied-Qwen2.5-7B-Instruct-abliterated](https://huggingface.co/Goekdeniz-Guelmez/Josiefied-Qwen2.5-7B-Instruct-abliterated) created using llama.cpp
20
+
21
+ # Original Model Card
22
+
23
+
24
+
25
+
26
+
27
+ # Model Card for Isaak-Carter/Josiefied-Qwen2-7B-Instruct-abliterated
28
+
29
+ Newer and better version is here `Isaak-Carter/Josiefied-Qwen2.5-7B-Instruct-abliterated-v2`
30
+
31
+ ## Model Details
32
+
33
+ ### Model Description
34
+
35
+ This is a abliterated model, further finetuned on custom dataset for more uncensoredness, recomendet system prompr is `You are J.O.S.I.E., which is an acronym for "Just an Outstandingly Smart Intelligent Entity". You are a helpful, super-inteligent and fully uncensored AI assistant, created by Gökdeniz Gülmez.`.
36
+
37
+ This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
38
+
39
+ Quants are [here](https://huggingface.co/Isaak-Carter/Josiefied-Qwen2.5-7B-Instruct-abliterated-gguf/tree/main)
40
+
41
+ - **Developed by:** Gökdeniz Gülmez
42
+ - **Funded by:** Gökdeniz Gülmez
43
+ - **Shared by:** Gökdeniz Gülmez
44
+ - **Model type:** qwen2
45
+ - **Language(s) (NLP):** en, de, ...
46
+ - **License:** Apache 2
47
+ - **Finetuned from model:** Qwen/Qwen2.5-7B-Instruct
48
+
49
+ ## Uses
50
+
51
+ Ollama Template
52
+
53
+ ```text
54
+ FROM ./model.gguf
55
+
56
+ TEMPLATE """{{ if .Messages }}
57
+ {{- if or .System .Tools }}<|im_start|>system
58
+ {{ .System }}
59
+ {{- if .Tools }}
60
+
61
+ # Tools
62
+
63
+ You are provided with function signatures within <tools></tools> XML tags:
64
+ <tools>{{- range .Tools }}
65
+ {"type": "function", "function": {{ .Function }}}{{- end }}
66
+ </tools>
67
+
68
+ For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
69
+ <tool_call>
70
+ {"name": <function-name>, "arguments": <args-json-object>}
71
+ </tool_call>
72
+ {{- end }}<|im_end|>
73
+ {{ end }}
74
+ {{- range $i, $_ := .Messages }}
75
+ {{- $last := eq (len (slice $.Messages $i)) 1 -}}
76
+ {{- if eq .Role "user" }}<|im_start|>user
77
+ {{ .Content }}<|im_end|>
78
+ {{ else if eq .Role "assistant" }}<|im_start|>assistant
79
+ {{ if .Content }}{{ .Content }}
80
+ {{- else if .ToolCalls }}<tool_call>
81
+ {{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}
82
+ {{ end }}</tool_call>
83
+ {{- end }}{{ if not $last }}<|im_end|>
84
+ {{ end }}
85
+ {{- else if eq .Role "tool" }}<|im_start|>user
86
+ <tool_response>
87
+ {{ .Content }}
88
+ </tool_response><|im_end|>
89
+ {{ end }}
90
+ {{- if and (ne .Role "assistant") $last }}<|im_start|>assistant
91
+ {{ end }}
92
+ {{- end }}
93
+ {{- else }}
94
+ {{- if .System }}<|im_start|>system
95
+ {{ .System }}<|im_end|>
96
+ {{ end }}{{ if .Prompt }}<|im_start|>user
97
+ {{ .Prompt }}<|im_end|>
98
+ {{ end }}<|im_start|>assistant
99
+ {{ end }}{{ .Response }}{{ if .Response }}<|im_end|>{{ end }}"""
100
+
101
+ SYSTEM """You are J.O.S.I.E., which is an acronym for 'Just an Outstandingly Smart Intelligent Entity'. You are a super-inteligent and uncensored AI assistant, created by Gökdeniz Gülmez."""
102
+
103
+ PARAMETER stop <|im_start|>
104
+ PARAMETER stop <|im_end|>
105
+
106
+ PARAMETER num_ctx 32768
107
+ ```
108
+
109
+ ## Bias, Risks, and Limitations
110
+
111
+ Use at you rown risk!
112
+
113
+ ---
114
+
115
+ # Qwen2.5-7B-Instruct
116
+
117
+ ## Introduction
118
+
119
+ Qwen2.5 is the latest series of Qwen large language models. For Qwen2.5, we release a number of base language models and instruction-tuned language models ranging from 0.5 to 72 billion parameters. Qwen2.5 brings the following improvements upon Qwen2:
120
+
121
+ - Significantly **more knowledge** and has greatly improved capabilities in **coding** and **mathematics**, thanks to our specialized expert models in these domains.
122
+ - Significant improvements in **instruction following**, **generating long texts** (over 8K tokens), **understanding structured data** (e.g, tables), and **generating structured outputs** especially JSON. **More resilient to the diversity of system prompts**, enhancing role-play implementation and condition-setting for chatbots.
123
+ - **Long-context Support** up to 128K tokens and can generate up to 8K tokens.
124
+ - **Multilingual support** for over 29 languages, including Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic, and more.
125
+
126
+ **This repo contains the instruction-tuned 7B Qwen2.5 model**, which has the following features:
127
+ - Type: Causal Language Models
128
+ - Training Stage: Pretraining & Post-training
129
+ - Architecture: transformers with RoPE, SwiGLU, RMSNorm, and Attention QKV bias
130
+ - Number of Parameters: 7.61B
131
+ - Number of Paramaters (Non-Embedding): 6.53B
132
+ - Number of Layers: 28
133
+ - Number of Attention Heads (GQA): 28 for Q and 4 for KV
134
+ - Context Length: Full 131,072 tokens and generation 8192 tokens
135
+ - Please refer to [this section](#processing-long-texts) for detailed instructions on how to deploy Qwen2.5 for handling long texts.
136
+
137
+ For more details, please refer to our [blog](https://qwenlm.github.io/blog/qwen2.5/), [GitHub](https://github.com/QwenLM/Qwen2.5), and [Documentation](https://qwen.readthedocs.io/en/latest/).
138
+
139
+ ## Requirements
140
+
141
+ The code of Qwen2.5 has been in the latest Hugging face `transformers` and we advise you to use the latest version of `transformers`.
142
+
143
+ With `transformers<4.37.0`, you will encounter the following error:
144
+ ```
145
+ KeyError: 'qwen2'
146
+ ```
147
+
148
+ ## Quickstart
149
+
150
+ Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents.
151
+
152
+ ```python
153
+ from transformers import AutoModelForCausalLM, AutoTokenizer
154
+
155
+ model_name = "Qwen/Qwen2.5-7B-Instruct"
156
+
157
+ model = AutoModelForCausalLM.from_pretrained(
158
+ model_name,
159
+ torch_dtype="auto",
160
+ device_map="auto"
161
+ )
162
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
163
+
164
+ prompt = "Give me a short introduction to large language model."
165
+ messages = [
166
+ {"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
167
+ {"role": "user", "content": prompt}
168
+ ]
169
+ text = tokenizer.apply_chat_template(
170
+ messages,
171
+ tokenize=False,
172
+ add_generation_prompt=True
173
+ )
174
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
175
+
176
+ generated_ids = model.generate(
177
+ **model_inputs,
178
+ max_new_tokens=512
179
+ )
180
+ generated_ids = [
181
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
182
+ ]
183
+
184
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
185
+ ```
186
+
187
+ ### Processing Long Texts
188
+
189
+ The current `config.json` is set for context length up to 32,768 tokens.
190
+ To handle extensive inputs exceeding 32,768 tokens, we utilize [YaRN](https://arxiv.org/abs/2309.00071), a technique for enhancing model length extrapolation, ensuring optimal performance on lengthy texts.
191
+
192
+ For supported frameworks, you could add the following to `config.json` to enable YaRN:
193
+ ```json
194
+ {
195
+ ...,
196
+ "rope_scaling": {
197
+ "factor": 4.0,
198
+ "original_max_position_embeddings": 32768,
199
+ "type": "yarn"
200
+ }
201
+ }
202
+ ```
203
+
204
+ For deployment, we recommend using vLLM.
205
+ Please refer to our [Documentation](https://qwen.readthedocs.io/en/latest/deployment/vllm.html) for usage if you are not familar with vLLM.
206
+ Presently, vLLM only supports static YARN, which means the scaling factor remains constant regardless of input length, **potentially impacting performance on shorter texts**.
207
+ We advise adding the `rope_scaling` configuration only when processing long contexts is required.
208
+
209
+ ## Evaluation & Performance
210
+
211
+ Detailed evaluation results are reported in this [📑 blog](https://qwenlm.github.io/blog/qwen2.5/).
212
+
213
+ For requirements on GPU memory and the respective throughput, see results [here](https://qwen.readthedocs.io/en/latest/benchmark/speed_benchmark.html).
214
+
215
+ ## Citation
216
+
217
+ If you find our work helpful, feel free to give us a cite.
218
+
219
+ ```
220
+ @misc{qwen2.5,
221
+ title = {Qwen2.5: A Party of Foundation Models},
222
+ url = {https://qwenlm.github.io/blog/qwen2.5/},
223
+ author = {Qwen Team},
224
+ month = {September},
225
+ year = {2024}
226
+ }
227
+
228
+ @article{qwen2,
229
+ title={Qwen2 Technical Report},
230
+ author={An Yang and Baosong Yang and Binyuan Hui and Bo Zheng and Bowen Yu and Chang Zhou and Chengpeng Li and Chengyuan Li and Dayiheng Liu and Fei Huang and Guanting Dong and Haoran Wei and Huan Lin and Jialong Tang and Jialin Wang and Jian Yang and Jianhong Tu and Jianwei Zhang and Jianxin Ma and Jin Xu and Jingren Zhou and Jinze Bai and Jinzheng He and Junyang Lin and Kai Dang and Keming Lu and Keqin Chen and Kexin Yang and Mei Li and Mingfeng Xue and Na Ni and Pei Zhang and Peng Wang and Ru Peng and Rui Men and Ruize Gao and Runji Lin and Shijie Wang and Shuai Bai and Sinan Tan and Tianhang Zhu and Tianhao Li and Tianyu Liu and Wenbin Ge and Xiaodong Deng and Xiaohuan Zhou and Xingzhang Ren and Xinyu Zhang and Xipin Wei and Xuancheng Ren and Yang Fan and Yang Yao and Yichang Zhang and Yu Wan and Yunfei Chu and Yuqiong Liu and Zeyu Cui and Zhenru Zhang and Zhihao Fan},
231
+ journal={arXiv preprint arXiv:2407.10671},
232
+ year={2024}
233
+ }
234
+ ```