当前位置:网站首页>[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 .
边栏推荐
- Simple understanding of flow
- Shell Basics (exit control, input and output, etc.)
- word样式和多级列表设置技巧(二)
- [today in history] July 25: IBM obtained the first patent; Verizon acquires Yahoo; Amazon releases fire phone
- ESP32-C3 基于Arduino框架下Blinker点灯控制10路开关或继电器组
- Perf performance debugging
- [operation and maintenance, implementation of high-quality products] interview skills for technical positions with a monthly salary of 10k+
- [机器学习] 实验笔记 – 表情识别(emotion recognition)
- 【AI4Code】《InferCode: Self-Supervised Learning of Code Representations by Predicting Subtrees》ICSE‘21
- Docker学习 - Redis集群-3主3从-扩容-缩容搭建
猜你喜欢

并发编程 — 内存模型 JMM

【历史上的今天】7 月 25 日:IBM 获得了第一项专利;Verizon 收购雅虎;亚马逊发布 Fire Phone

2022.07.24 (lc_6126_design food scoring system)

Clickhouse notes 03-- grafana accesses Clickhouse

Shell常用脚本:检测某域名、IP地址是否通

485 communication (detailed explanation)

Zero basic learning canoe panel (12) -- progress bar

2022.07.24 (lc_6125_equal row and column pairs)

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

Introduction to web security UDP testing and defense
随机推荐
【问题解决】ibatis.binding.BindingException: Type interface xxDao is not known to the MapperRegistry.
EMQX Cloud 更新:日志分析增加更多参数,监控运维更省心
yum和vim须掌握的常用操作
【AI4Code】《CodeBERT: A Pre-Trained Model for Programming and Natural Languages》 EMNLP 2020
Leetcode 0133. clone diagram
[operation and maintenance, implementation of high-quality products] interview skills for technical positions with a monthly salary of 10k+
Use of Spirng @conditional conditional conditional annotation
Shell常用脚本:检测某域名、IP地址是否通
状态(State)模式
【重温SSM框架系列】15 - SSM系列博文总结【SSM杀青篇】
Common operations for Yum and VIM
【AI4Code】《CoSQA: 20,000+ Web Queries for Code Search and Question Answering》 ACL 2021
485通讯( 详解 )
OAuth,JWT ,OIDC你们搞得我好乱啊
Shell common script: get the IP address of the network card
深度学习的训练、预测过程详解【以LeNet模型和CIFAR10数据集为例】
全球都热炸了,谷歌服务器已经崩掉了
ESP32-C3 基于Arduino框架下Blinker点灯控制10路开关或继电器组
Masscode is an excellent open source code fragment manager
【CSDN 年终总结】结束与开始,一直在路上—— “1+1=王”的2021总结