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.
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.
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.
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.
Exceptional Performance
: OpenCoder achieves high performance across multiple language model benchmarks, positioning it among the leading open-source models for code.
This is not the end; we are organizing the remaining data and uploading it progressively.
4. Benchmarks
Note:
For the detailed evaluation results, please refer to
our paper
.
model
OpenCoder-1.5B-Base
OpenCoder-8B-Base
HumanEval(+)
54.3 (49.4)
66.5 (63.4)
MBPP(+)
70.6 (58.7)
79.9 (70.4)
BigCodeBench
24.5
40.5
BigCodeBench-Hard
5.4
9.5
5. Inference
Inference with Huggingface's Transformers
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "infly/OpenCoder-1.5B-Base"
model = AutoModelForCausalLM.from_pretrained(model_name,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
inputs = tokenizer("# write a quick sort algorithm", return_tensors="pt")
outputs = model.generate(**inputs.to(model.device), max_new_tokens=128)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(result)
6. License
OpenCoder series (including Base and Chat) support commercial applications under a permissive
License
.
7. Citation
@inproceedings{Huang2024OpenCoderTO,
title={OpenCoder: The Open Cookbook for Top-Tier Code Large Language Models},
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},
year={2024},
url={https://arxiv.org/pdf/2411.04905}
}
Runs of infly OpenCoder-1.5B-Base on huggingface.co
1.1K
Total runs
0
24-hour runs
-9
3-day runs
-8
7-day runs
796
30-day runs
More Information About OpenCoder-1.5B-Base huggingface.co Model
OpenCoder-1.5B-Base huggingface.co is an AI model on huggingface.co that provides OpenCoder-1.5B-Base's model effect (), which can be used instantly with this infly OpenCoder-1.5B-Base model. huggingface.co supports a free trial of the OpenCoder-1.5B-Base model, and also provides paid use of the OpenCoder-1.5B-Base. Support call OpenCoder-1.5B-Base model through api, including Node.js, Python, http.
OpenCoder-1.5B-Base huggingface.co is an online trial and call api platform, which integrates OpenCoder-1.5B-Base's modeling effects, including api services, and provides a free online trial of OpenCoder-1.5B-Base, you can try OpenCoder-1.5B-Base online for free by clicking the link below.
infly OpenCoder-1.5B-Base online free url in huggingface.co:
OpenCoder-1.5B-Base is an open source model from GitHub that offers a free installation service, and any user can find OpenCoder-1.5B-Base on GitHub to install. At the same time, huggingface.co provides the effect of OpenCoder-1.5B-Base install, users can directly use OpenCoder-1.5B-Base installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
OpenCoder-1.5B-Base install url in huggingface.co: