Text Generation
Transformers
GGUF
English
Chinese
Inference Endpoints
conversational
munish0838 commited on
Commit
efdcc27
1 Parent(s): abea203

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +135 -0
README.md ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+
4
+ license: other
5
+ license_name: inf
6
+ license_link: https://huggingface.co/infly/OpenCoder-8B-Instruct/blob/main/LICENSE
7
+ language:
8
+ - en
9
+ - zh
10
+ base_model:
11
+ - infly/OpenCoder-8B-Base
12
+ pipeline_tag: text-generation
13
+ library_name: transformers
14
+ datasets:
15
+ - OpenCoder-LLM/opencoder-sft-stage1
16
+ - OpenCoder-LLM/opencoder-sft-stage2
17
+
18
+ ---
19
+
20
+ [![QuantFactory Banner](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)](https://hf.co/QuantFactory)
21
+
22
+
23
+ # QuantFactory/OpenCoder-8B-Instruct-GGUF
24
+ This is quantized version of [infly/OpenCoder-8B-Instruct](https://huggingface.co/infly/OpenCoder-8B-Instruct) created using llama.cpp
25
+
26
+ # Original Model Card
27
+
28
+
29
+
30
+
31
+ <div align="center">
32
+ <img src="https://github.com/OpenCoder-llm/opencoder-llm.github.io/blob/main/static/images/opencoder_icon.jpg?raw=true" width="50%" alt="OpenCoder-Icon" />
33
+ </div>
34
+
35
+
36
+
37
+ <p align="center">
38
+ <a href="https://arxiv.org/pdf/2411.04905"><b>Paper Link</b>👁️</a>
39
+ </p>
40
+
41
+
42
+ ## 1. Introduction
43
+
44
+ **OpenCoder** is an open and reproducible code LLM family which includes 1.5B and 8B base and chat models, supporting both English and Chinese languages. Starting from scratch, OpenCoder is pretrained on 2.5 trillion tokens composed of 90% raw code and 10% code-related web data, and supervised finetuned on over 4.5M high-quality SFT examples, finally reaching the performance of top-tier code LLMs. We provide not only model weights and inference code, but also the reproducible training data, the complete data processing pipeline, rigorous experimental ablation results, and detailed training protocols. Empowering researchers to build and innovate, OpenCoder is your open foundation for advancing code AI.
45
+
46
+ - **Complete Open Source**: OpenCoder ensures full transparency by releasing not only the model weights and forthcoming inference code but also the complete data-cleaning code for training. This release includes high-quality synthetic data, an extensive set of checkpoints, and a dataset of over 4.5 million supervised fine-tuning (SFT) entries, making OpenCoder one of the most comprehensively open-sourced models available.
47
+ - **Comprehensive Experimental Analysis**: OpenCoder is rigorously tested through extensive ablation studies on various data-cleaning strategies and training processes, including file-level and repository-level deduplication experiments, ensuring thorough exploration and validation of the model’s performance.
48
+ - **High-Quality Synthetic Data**: OpenCoder provides a fully developed synthetic data generation process and over 4.5 million SFT data entries, establishing a robust data foundation for model training and evaluation.
49
+ - **Exceptional Performance**: OpenCoder achieves high performance across multiple language model benchmarks, positioning it among the leading open-source models for code.
50
+
51
+
52
+ ## 2. Models
53
+
54
+ | Model | Sequence Length | Download |
55
+ |:---------------------:|:---------------:|:-----------------------------------------------------------------------:|
56
+ | OpenCoder-1.5B-Base | 4K | 🤗 [HuggingFace](https://huggingface.co/infly/OpenCoder-1.5B-Base) |
57
+ | OpenCoder-8B-Base | 8K | 🤗 [HuggingFace](https://huggingface.co/infly/OpenCoder-8B-Base) |
58
+ | OpenCoder-1.5B-Instruct | 4K | 🤗 [HuggingFace](https://huggingface.co/infly/OpenCoder-1.5B-Instruct) |
59
+ | OpenCoder-8B-Instruct | 8K | 🤗 [HuggingFace](https://huggingface.co/infly/OpenCoder-8B-Instruct) |
60
+
61
+
62
+ ## 3. Datasets
63
+
64
+ | Dataset | Num | Download |
65
+ |:---------------------:|:---------------:|:-----------------------------------------------------------------------:|
66
+ | OpenCoder-SFT-Stage1 | 4.21 M | 🤗 [HuggingFace](https://huggingface.co/datasets/OpenCoder-LLM/opencoder-sft-stage1) |
67
+ | OpenCoder-SFT-Stage2 | 375 K | 🤗 [HuggingFace](https://huggingface.co/datasets/OpenCoder-LLM/opencoder-sft-stage2) |
68
+
69
+
70
+ ## 4. Benchmarks
71
+
72
+ **Note:** For the detailed evaluation results, please refer to [our paper](https://arxiv.org/pdf/2411.04905).
73
+
74
+ <!-- ### Base Model -->
75
+ <!-- | model | OpenCoder-1.5B-Base | OpenCoder-8B-Base |
76
+ |:---------------:|:-------------:|:------------:|
77
+ | HumanEval(+) | 54.3 (49.4) | 66.5 (63.4) |
78
+ | MBPP(+) | 70.6 (58.7) | 79.9 (70.4) |
79
+ | BigCodeBench | 24.5 | 40.5 |
80
+ | BigCodeBench-Hard | 5.4 | 9.5 | -->
81
+
82
+
83
+ <!-- ### Chat Model -->
84
+ | model | OpenCoder-1.5B-Instruct | OpenCoder-8B-Instruct |
85
+ |:---------------:|:-------------:|:------------:|
86
+ | HumanEval(+) | 72.5 (67.7) | 83.5 (78.7) |
87
+ | MBPP(+) | 72.7 (61.9) | 79.1 (69.0) |
88
+ | BigCodeBench | 33.3 | 40.3 |
89
+ | BigCodeBench-Hard | 11.5 | 16.9 |
90
+ | LiveCodeBench | 12.8 | 23.2 |
91
+ | MultiPL-E (AVG) | 57.5 | 71.0 |
92
+
93
+
94
+ ## 5. Inference
95
+
96
+ ### Inference with Huggingface's Transformers
97
+
98
+ ```python
99
+ import torch
100
+ from transformers import AutoTokenizer, AutoModelForCausalLM
101
+
102
+ model_name = "infly/OpenCoder-8B-Instruct"
103
+ model = AutoModelForCausalLM.from_pretrained(model_name,
104
+ torch_dtype=torch.bfloat16,
105
+ device_map="auto",
106
+ trust_remote_code=True)
107
+ tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
108
+
109
+ messages=[
110
+ { 'role': 'user', 'content': "write a quick sort algorithm in python."}
111
+ ]
112
+
113
+ inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
114
+
115
+ outputs = model.generate(inputs, max_new_tokens=512, do_sample=False)
116
+
117
+ result = tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True)
118
+ print(result)
119
+ ```
120
+
121
+ <!-- ### Inference with vLLM (recommended) -->
122
+
123
+ ## 6. License
124
+
125
+ OpenCoder series (including Base and Chat) support commercial applications under a permissive [License](https://huggingface.co/infly/OpenCoder-8B-Instruct/blob/main/LICENSE).
126
+
127
+ ## 7. Citation
128
+ ```
129
+ @inproceedings{Huang2024OpenCoderTO,
130
+ title={OpenCoder: The Open Cookbook for Top-Tier Code Large Language Models},
131
+ author={Siming Huang and Tianhao Cheng and Jason Klein Liu and Jiaran Hao and Liuyihan Song and Yang Xu and J. Yang and J. H. Liu and Chenchen Zhang and Linzheng Chai and Ruifeng Yuan and Zhaoxiang Zhang and Jie Fu and Qian Liu and Ge Zhang and Zili Wang and Yuan Qi and Yinghui Xu and Wei Chu},
132
+ year={2024},
133
+ url={https://arxiv.org/pdf/2411.04905}
134
+ }
135
+ ```