munish0838 commited on
Commit
f278bfc
1 Parent(s): 5572dda

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +125 -0
README.md ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+
4
+ license: apache-2.0
5
+ license_link: https://huggingface.co/Qwen/Qwen2.5-Coder-0.5B-Instruct/blob/main/LICENSE
6
+ language:
7
+ - en
8
+ base_model:
9
+ - Qwen/Qwen2.5-Coder-0.5B
10
+ pipeline_tag: text-generation
11
+ library_name: transformers
12
+ tags:
13
+ - code
14
+ - codeqwen
15
+ - chat
16
+ - qwen
17
+ - qwen-coder
18
+
19
+ ---
20
+
21
+ [![QuantFactory Banner](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)](https://hf.co/QuantFactory)
22
+
23
+
24
+ # QuantFactory/Qwen2.5-Coder-0.5B-Instruct-GGUF
25
+ This is quantized version of [Qwen/Qwen2.5-Coder-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-0.5B-Instruct) created using llama.cpp
26
+
27
+ # Original Model Card
28
+
29
+
30
+
31
+ # Qwen2.5-Coder-0.5B-Instruct
32
+
33
+ ## Introduction
34
+
35
+ Qwen2.5-Coder is the latest series of Code-Specific Qwen large language models (formerly known as CodeQwen). As of now, Qwen2.5-Coder has covered six mainstream model sizes, 0.5, 1.5, 3, 7, 14, 32 billion parameters, to meet the needs of different developers. Qwen2.5-Coder brings the following improvements upon CodeQwen1.5:
36
+
37
+ - Significantly improvements in **code generation**, **code reasoning** and **code fixing**. Base on the strong Qwen2.5, we scale up the training tokens into 5.5 trillion including source code, text-code grounding, Synthetic data, etc. Qwen2.5-Coder-32B has become the current state-of-the-art open-source codeLLM, with its coding abilities matching those of GPT-4o.
38
+ - A more comprehensive foundation for real-world applications such as **Code Agents**. Not only enhancing coding capabilities but also maintaining its strengths in mathematics and general competencies.
39
+
40
+ **This repo contains the instruction-tuned 0.5B Qwen2.5-Coder model**, which has the following features:
41
+ - Type: Causal Language Models
42
+ - Training Stage: Pretraining & Post-training
43
+ - Architecture: transformers with RoPE, SwiGLU, RMSNorm, Attention QKV bias and tied word embeddings
44
+ - Number of Parameters: 0.49B
45
+ - Number of Paramaters (Non-Embedding): 0.36B
46
+ - Number of Layers: 24
47
+ - Number of Attention Heads (GQA): 14 for Q and 2 for KV
48
+ - Context Length: Full 32,768 tokens
49
+
50
+ For more details, please refer to our [blog](https://qwenlm.github.io/blog/qwen2.5-coder-family/), [GitHub](https://github.com/QwenLM/Qwen2.5-Coder), [Documentation](https://qwen.readthedocs.io/en/latest/), [Arxiv](https://arxiv.org/abs/2409.12186).
51
+
52
+ ## Requirements
53
+
54
+ The code of Qwen2.5-Coder has been in the latest Hugging face `transformers` and we advise you to use the latest version of `transformers`.
55
+
56
+ With `transformers<4.37.0`, you will encounter the following error:
57
+ ```
58
+ KeyError: 'qwen2'
59
+ ```
60
+
61
+ ## Quickstart
62
+
63
+ Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents.
64
+
65
+ ```python
66
+ from transformers import AutoModelForCausalLM, AutoTokenizer
67
+
68
+ model_name = "Qwen/Qwen2.5-Coder-0.5B-Instruct"
69
+
70
+ model = AutoModelForCausalLM.from_pretrained(
71
+ model_name,
72
+ torch_dtype="auto",
73
+ device_map="auto"
74
+ )
75
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
76
+
77
+ prompt = "write a quick sort algorithm."
78
+ messages = [
79
+ {"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
80
+ {"role": "user", "content": prompt}
81
+ ]
82
+ text = tokenizer.apply_chat_template(
83
+ messages,
84
+ tokenize=False,
85
+ add_generation_prompt=True
86
+ )
87
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
88
+
89
+ generated_ids = model.generate(
90
+ **model_inputs,
91
+ max_new_tokens=512
92
+ )
93
+ generated_ids = [
94
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
95
+ ]
96
+
97
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
98
+ ```
99
+
100
+
101
+ ## Evaluation & Performance
102
+
103
+ Detailed evaluation results are reported in this [📑 blog](https://qwenlm.github.io/blog/qwen2.5-coder-family/).
104
+
105
+ For requirements on GPU memory and the respective throughput, see results [here](https://qwen.readthedocs.io/en/latest/benchmark/speed_benchmark.html).
106
+
107
+ ## Citation
108
+
109
+ If you find our work helpful, feel free to give us a cite.
110
+
111
+ ```
112
+ @article{hui2024qwen2,
113
+ title={Qwen2. 5-Coder Technical Report},
114
+ author={Hui, Binyuan and Yang, Jian and Cui, Zeyu and Yang, Jiaxi and Liu, Dayiheng and Zhang, Lei and Liu, Tianyu and Zhang, Jiajun and Yu, Bowen and Dang, Kai and others},
115
+ journal={arXiv preprint arXiv:2409.12186},
116
+ year={2024}
117
+ }
118
+ @article{qwen2,
119
+ title={Qwen2 Technical Report},
120
+ 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},
121
+ journal={arXiv preprint arXiv:2407.10671},
122
+ year={2024}
123
+ }
124
+ ```
125
+