SEED: Customize Large Language Models with Sample-Efficient Adaptation for Code Generation

本文是LLM系列文章,针对《SEED: Customize Large Language Models with Sample-Efficient Adaptation for Code Generation》的翻译。

SEED:自定义大型语言模型,并对代码生成进行高效的示例自适应

摘要

尽管大型语言模型(LLM)在代码生成方面取得了重大进展,但它们在特定场景中仍难以完成代码生成任务。这些场景通常需要对LLM进行调整以满足特定需求,但实践中可用的有限训练样本导致代码生成性能较差。因此,如何在很少的训练样本的情况下有效地将LLM适应新的场景是当前代码生成的一个主要挑战。在本文中,我们提出了一种新的自适应方法SEED,它代表了用于代码生成的带有错误驱动学习的样本有效自适应。SEED利用LLM犯下的错误作为学习机会,使用错误修正来克服自身的缺点,从而实现高效学习。具体而言,SEED包括识别LLM生成的错误代码,使用SELF-REVISIE进行代码修订,使用修订后的代码优化模型,并迭代调整过程以进行持续改进。实验结果表明,与其他主流微调方法相比,SEED在较少的训练样本下实现了优越的性能,在Pass@1在多个代码生成基准上。我们还验证了SELF-REVISE的有效性,它生成的修订代码与数据集的代码样本相比更有效地优化了模型。此外,SEED在各种LLM中始终表现出强大的性能,突出了其可推广性。

1 引言

2 动机示例

3 方法

4 评估

5 相关工作

6 对有效性的威胁

7 结论

在这项工作中,我们提出了SEED,这是一种用于代码生成的具有错误驱动学习的样本高效自适应,在样本有限的特定场景中提

# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # server: port: 12345 servlet: session: timeout: 120m context-path: /dolphinscheduler/ compression: enabled: true mime-types: text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml jetty: max-http-form-post-size: 5000000 spring: application: name: api-server banner: charset: UTF-8 jackson: time-zone: UTC date-format: "yyyy-MM-dd HH:mm:ss" servlet: multipart: max-file-size: 1024MB max-request-size: 1024MB messages: basename: i18n/messages datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://rm-2zer55j9y09b13451.mysql.rds.aliyuncs.com:3306/bigdata_dolphinscheduler?&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8 username: admin password: 1231123 hikari: connection-test-query: select 1 minimum-idle: 5 auto-commit: true validation-timeout: 3000 pool-name: DolphinScheduler maximum-pool-size: 50 connection-timeout: 30000 idle-timeout: 600000 leak-detection-threshold: 0 initialization-fail-timeout: 1 quartz: auto-startup: false job-store-type: jdbc jdbc: initialize-schema: never properties: org.quartz.threadPool.threadPriority: 5 org.quartz.jobStore.isClustered: true # org.quartz.jobStore.class: org.quartz.impl.jdbcjobstore.JobStoreTX org.quartz.scheduler.instanceId: AUTO org.quartz.jobStore.tablePrefix: QRTZ_ org.quartz.jobStore.acquireTriggersWithinLock: true org.quartz.scheduler.instanceName: DolphinScheduler org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool org.quartz.jobStore.useProperties: false org.quartz.threadPool.makeThreadsDaemons: true org.quartz.threadPool.threadCount: 25 org.quartz.jobStore.misfireThreshold: 60000 org.quartz.scheduler.makeSchedulerThreadDaemon: true org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate org.quartz.jobStore.clusterCheckinInterval: 5000 org.quartz.scheduler.batchTriggerAcquisitionMaxCount: 1 management: endpoints: web: exposure: include: '*' endpoint: health: enabled: true show-details: always health: db: enabled: true defaults: enabled: false metrics: tags: application: ${spring.application.name} registry: type: zookeeper zookeeper: namespace: dolphinscheduler connect-string: master-1-1:2181,master-1-2:2181,master-1-3:2181 retry-policy: base-sleep-time: 60ms max-sleep: 300ms max-retries: 5 session-timeout: 30s connection-timeout: 9s block-until-connected: 600ms digest: ~ audit: enabled: false metrics: enabled: true python-gateway: # Weather enable python gateway server or not. The default value is true. enabled: true # The address of Python gateway server start. Set its value to `0.0.0.0` if your Python API run in different # between Python gateway server. It could be be specific to other address like `127.0.0.1` or `localhost` gateway-server-address: 0.0.0.0 # The port of Python gateway server start. Define which port you could connect to Python gateway server from # Python API side. gateway-server-port: 25333 # The address of Python callback client. python-address: 127.0.0.1 # The port of Python callback client. python-port: 25334 # Close connection of socket server if no other request accept after x milliseconds. Define value is (0 = infinite), # and socket server would never close even though no requests accept connect-timeout: 0 # Close each active connection of socket server if python program not active after x milliseconds. Define value is # (0 = infinite), and socket server would never close even though no requests accept read-timeout: 0 security: authentication: # Authentication types (supported types: PASSWORD,LDAP) type: PASSWORD # IF you set type `LDAP`, below config will be effective ldap: # admin userId user.admin: read-only-admin # ldap server config urls: ldap://ldap.forumsys.com:389/ base.dn: dc=example,dc=com username: cn=read-only-admin,dc=example,dc=com password: password user.identity.attribute: uid user.email.attribute: mail # Traffic control, if you turn on this config, the maximum number of request/s will be limited. # global max request number per second # default tenant-level max request number traffic: control: global-switch: false max-global-qps-rate: 300 tenant-switch: false default-tenant-qps-rate: 10 #customize-tenant-qps-rate: # eg. #tenant1: 11 #tenant2: 20 cloud: enabled: false client-id: "" tenant-id: "" client-secret: "" # Override by profile --- spring: config: activate: on-profile: mysql datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://rm-2zer55j9y09b13451.mysql.rds.aliyuncs.com:3306/bigdata_dolphinscheduler?&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8 username: admin password: 1231123 quartz: properties: org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate 这是配置
06-28
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

UnknownBody

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值