当前位置:网站首页>[ai4code final chapter] alphacode: competition level code generation with alphacode (deepmind)
[ai4code final chapter] alphacode: competition level code generation with alphacode (deepmind)
2022-07-25 13:08:00 【chad_ lee】
AlphaCode—— Macro recommendations (DeepMind)

14 Work together ,74 Page papers .
Think CodeX Just made a simple Natural language - Programming language My translation task ,AlphaCode To do a more difficult . The input and output are :

Method
technological process

Model training is divided into pre training and fine tuning , Then, in the prediction stage, large-scale sampling ( Recall ) Get onemillion , Then clustering and filtering get 1000 individual ( Rough row ), Then choose 10 Submission ( Fine discharge ).
Data sets

First in Github Collect open source code , After pretreatment and cleaning 715GB, As a pre training data set ; And then use CodeContests Dataset tuning , The format is shown in the figure above .
Model structure

No model diagram . differ CodeX Of GPT, Only Transformer Of decoder, Here is a complete Transformer, both encoder Also have decoder. Minimum model 3 Million parameters , Maximum model 4000 Million parameters .
What is worth mentioning here is the multi-head attention Only multiple query,KV It's all the same .
Fine-tuning
encoder The input is the description of the topic ( Also include : Of the subject tags、solution The language used 、 Examples in the title ),decoder The output of corresponds to ground-truth It's a solution, It can be right , It can also be wrong .
Sampling & Evaluation: Massive trial and error

- Step1: Enter the title description into Model 1, From the model 1 Sample out 100 Ten thousand output codes .
- Step2: Obviously, the sampled 100 In 10000 codes 99% Can't run 、 Wrong code , Use the one that comes with the title test case, First filter out these invalid 、 Error code , Still left 1000 Code that can run .( Recall : One million ~ thousand )
- Step3: AlphaCode Introduce an extra Model 2, Model 2 It's also a model 1 Pre training model of , however fine-tuning The purpose of is to enter the Title Description , Output test case. Model 2 Automatically generated test case Accuracy is not guaranteed , It's just For next clustering use Of . Model 2 Generated for the current problem 50 individual test inputs.
- Step4: The generated 50 individual test inputs Input to 1000 Code , If the generation results of some codes are almost the same , Explain that the algorithm or logic behind these codes is similar , Can be classified into one category . After clustering , leave 10 Class code , First select the code from a large number of classes to submit , More likely to win .( Fine discharge : thousand ~10)
experimental result
Competition results
stay 10 The result of this program competition . Did not actually participate , It's the estimated ranking , Because there are penalties in the competition , So this penalty can only be estimated .AlphaCode Basically in Codeforce Medium level in the competition .

Evaluation indicators
- [email protected]:Step1 Sampling recall K Code , Then cluster and select 10 Submission .
- [email protected]: Sample out k Code , If one is right, it will be a hit .
The effect of the number of samples

Step1 The more code samples are recalled , The better the result. . The comparison between the left and right figures shows , After filtering 、 Cluster the selected code , Basically the best . Especially the comparison of the following figure :

Random from K It's useless to choose among the samples ; Clustering is a little better than filtering alone ; clustering + Filtering and oracle It's a little bit close .
The influence of money

The longer you train , The more you pick , The better the result. .
Security discussion
There's only one page ( article 74 page ), Basic is CodeX Subset .
边栏推荐
- 零基础学习CANoe Panel(16)—— Clock Control/Panel Control/Start Stop Control/Tab Control
- clickhouse笔记03-- Grafana 接入ClickHouse
- 【视频】马尔可夫链原理可视化解释与R语言区制转换MRS实例|数据分享
- Ministry of Public Security: the international community generally believes that China is one of the safest countries in the world
- 【OpenCV 例程 300篇】239. Harris 角点检测之精确定位(cornerSubPix)
- R语言GLM广义线性模型:逻辑回归、泊松回归拟合小鼠临床试验数据(剂量和反应)示例和自测题
- 工业互联网的内涵及其应用
- 7行代码让B站崩溃3小时,竟因“一个诡计多端的0”
- 错误: 找不到或无法加载主类 xxxx
- Machine learning strong foundation program 0-4: popular understanding of Occam razor and no free lunch theorem
猜你喜欢

The larger the convolution kernel, the stronger the performance? An interpretation of replknet model

如何理解Keras中的指标Metrics

程序员奶爸自制AI喂奶检测仪,预判宝宝饿点,不让哭声影响老婆睡眠

【AI4Code】《InferCode: Self-Supervised Learning of Code Representations by Predicting Subtrees》ICSE‘21

跌荡的人生

Microsoft proposed CodeT: a new SOTA for code generation, with 20 points of performance improvement

cv2.resize函数报错:error: (-215:Assertion failed) func != 0 in function ‘cv::hal::resize‘

Seven lines of code made station B crash for three hours, but "a scheming 0"

B tree and b+ tree
![[Video] Markov chain Monte Carlo method MCMC principle and R language implementation | data sharing](/img/20/bb43ab1bc447b519c3b1de0f809b31.png)
[Video] Markov chain Monte Carlo method MCMC principle and R language implementation | data sharing
随机推荐
go : gin 自定义日志输出格式
业务可视化-让你的流程图'Run'起来(3.分支选择&跨语言分布式运行节点)
“蔚来杯“2022牛客暑期多校训练营2 补题题解(G、J、K、L)
如何用因果推断和实验驱动用户增长? | 7月28日TF67
G027-OP-INS-RHEL-04 RedHat OpenStack 创建自定义的QCOW2格式镜像
2022 年中回顾 | 大模型技术最新进展 澜舟科技
Common operations for Yum and VIM
【视频】马尔可夫链蒙特卡罗方法MCMC原理与R语言实现|数据分享
Shell common script: judge whether the file of the remote host exists
力扣 83双周赛T4 6131.不可能得到的最短骰子序列、303 周赛T4 6127.优质数对的数目
错误: 找不到或无法加载主类 xxxx
Microsoft proposed CodeT: a new SOTA for code generation, with 20 points of performance improvement
Can flinkcdc import multiple tables in mongodb database together?
【OpenCV 例程 300篇】239. Harris 角点检测之精确定位(cornerSubPix)
Zero basic learning canoe panel (12) -- progress bar
深度学习的训练、预测过程详解【以LeNet模型和CIFAR10数据集为例】
并发编程 — 内存模型 JMM
How to use causal inference and experiments to drive user growth| July 28 tf67
Vim技巧:永远显示行号
A hard journey