VeriGen: A Large Language Model for Verilog Code Generation
In this study, we explore the capability of Large Language Models (LLMs) to automate hardware design by automatically completing partial Verilog code, a common language for designing and modeling digital systems. We fine-tune pre-existing LLMs on Verilog datasets compiled from GitHub and Verilog tex...
Gespeichert in:
Veröffentlicht in: | ACM transactions on design automation of electronic systems 2024-04, Vol.29 (3), p.1-31, Article 46 |
---|---|
Hauptverfasser: | , , , , , , |
Format: | Artikel |
Sprache: | eng |
Schlagworte: | |
Online-Zugang: | Volltext |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
container_end_page | 31 |
---|---|
container_issue | 3 |
container_start_page | 1 |
container_title | ACM transactions on design automation of electronic systems |
container_volume | 29 |
creator | Thakur, Shailja Ahmad, Baleegh Pearce, Hammond Tan, Benjamin Dolan-Gavitt, Brendan Karri, Ramesh Garg, Siddharth |
description | In this study, we explore the capability of Large Language Models (LLMs) to automate hardware design by automatically completing partial Verilog code, a common language for designing and modeling digital systems. We fine-tune pre-existing LLMs on Verilog datasets compiled from GitHub and Verilog textbooks. We evaluate the functional correctness of the generated Verilog code using a specially designed test suite, featuring a custom problem set and testing benches. Here, our fine-tuned open-source CodeGen-16B model outperforms the commercial state-of-the-art GPT-3.5-turbo model with a 1.1% overall increase. Upon testing with a more diverse and complex problem set, we find that the fine-tuned model shows competitive performance against state-of-the-art gpt-3.5-turbo, excelling in certain scenarios. Notably, it demonstrates a 41% improvement in generating syntactically correct Verilog code across various problem categories compared to its pre-trained counterpart, highlighting the potential of smaller, in-house LLMs in hardware design automation. We release our training/evaluation scripts and LLM checkpoints as open-source contributions. |
doi_str_mv | 10.1145/3643681 |
format | Article |
fullrecord | <record><control><sourceid>acm_cross</sourceid><recordid>TN_cdi_crossref_primary_10_1145_3643681</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>3643681</sourcerecordid><originalsourceid>FETCH-LOGICAL-a277t-2d2fdb9d4fac3a6e390dc220b30bbb19fa218d841ecd445efe20d8d63246550b3</originalsourceid><addsrcrecordid>eNo9jz1LxEAQhhdR8DzF3mo7q-jsZxKtjqCnELFR27AfsyGSy8rmLPz37nGnzczDOw8DLyGXDG4Yk-pWaCl0xY7IgilVFqWA-jgzVLKQmU_J2Tx_AoAqtVqQ-w9MwxqnO7qirUk95jn13ybDS_Q40hAT3Tlj7GmTE5plTGY7xOmcnAQzznhx2Evy_vjw1jwV7ev6uVm1heFluS2458Hb2stgnDAaRQ3ecQ5WgLWW1cFwVvlKMnReSoUBOfjKa8GlViprS3K9_-tSnOeEoftKw8akn45Bt-vcHTpn82pvGrf5l_6Ovy-pT78</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>VeriGen: A Large Language Model for Verilog Code Generation</title><source>ACM Digital Library Complete</source><creator>Thakur, Shailja ; Ahmad, Baleegh ; Pearce, Hammond ; Tan, Benjamin ; Dolan-Gavitt, Brendan ; Karri, Ramesh ; Garg, Siddharth</creator><creatorcontrib>Thakur, Shailja ; Ahmad, Baleegh ; Pearce, Hammond ; Tan, Benjamin ; Dolan-Gavitt, Brendan ; Karri, Ramesh ; Garg, Siddharth</creatorcontrib><description>In this study, we explore the capability of Large Language Models (LLMs) to automate hardware design by automatically completing partial Verilog code, a common language for designing and modeling digital systems. We fine-tune pre-existing LLMs on Verilog datasets compiled from GitHub and Verilog textbooks. We evaluate the functional correctness of the generated Verilog code using a specially designed test suite, featuring a custom problem set and testing benches. Here, our fine-tuned open-source CodeGen-16B model outperforms the commercial state-of-the-art GPT-3.5-turbo model with a 1.1% overall increase. Upon testing with a more diverse and complex problem set, we find that the fine-tuned model shows competitive performance against state-of-the-art gpt-3.5-turbo, excelling in certain scenarios. Notably, it demonstrates a 41% improvement in generating syntactically correct Verilog code across various problem categories compared to its pre-trained counterpart, highlighting the potential of smaller, in-house LLMs in hardware design automation. We release our training/evaluation scripts and LLM checkpoints as open-source contributions.</description><identifier>ISSN: 1084-4309</identifier><identifier>EISSN: 1557-7309</identifier><identifier>DOI: 10.1145/3643681</identifier><language>eng</language><publisher>New York, NY: ACM</publisher><subject>Computing methodologies ; Hardware ; Hardware description languages and compilation ; Machine translation ; Natural language processing</subject><ispartof>ACM transactions on design automation of electronic systems, 2024-04, Vol.29 (3), p.1-31, Article 46</ispartof><rights>Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from</rights><lds50>peer_reviewed</lds50><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed><citedby>FETCH-LOGICAL-a277t-2d2fdb9d4fac3a6e390dc220b30bbb19fa218d841ecd445efe20d8d63246550b3</citedby><cites>FETCH-LOGICAL-a277t-2d2fdb9d4fac3a6e390dc220b30bbb19fa218d841ecd445efe20d8d63246550b3</cites><orcidid>0000-0002-7642-3638 ; 0000-0001-9590-5061 ; 0000-0002-8867-4282 ; 0000-0002-6158-9512 ; 0000-0001-6854-3966 ; 0000-0002-3488-7004 ; 0000-0001-7989-5617</orcidid></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><linktopdf>$$Uhttps://dl.acm.org/doi/pdf/10.1145/3643681$$EPDF$$P50$$Gacm$$H</linktopdf><link.rule.ids>314,776,780,2276,27901,27902,40172,75970</link.rule.ids></links><search><creatorcontrib>Thakur, Shailja</creatorcontrib><creatorcontrib>Ahmad, Baleegh</creatorcontrib><creatorcontrib>Pearce, Hammond</creatorcontrib><creatorcontrib>Tan, Benjamin</creatorcontrib><creatorcontrib>Dolan-Gavitt, Brendan</creatorcontrib><creatorcontrib>Karri, Ramesh</creatorcontrib><creatorcontrib>Garg, Siddharth</creatorcontrib><title>VeriGen: A Large Language Model for Verilog Code Generation</title><title>ACM transactions on design automation of electronic systems</title><addtitle>ACM TODAES</addtitle><description>In this study, we explore the capability of Large Language Models (LLMs) to automate hardware design by automatically completing partial Verilog code, a common language for designing and modeling digital systems. We fine-tune pre-existing LLMs on Verilog datasets compiled from GitHub and Verilog textbooks. We evaluate the functional correctness of the generated Verilog code using a specially designed test suite, featuring a custom problem set and testing benches. Here, our fine-tuned open-source CodeGen-16B model outperforms the commercial state-of-the-art GPT-3.5-turbo model with a 1.1% overall increase. Upon testing with a more diverse and complex problem set, we find that the fine-tuned model shows competitive performance against state-of-the-art gpt-3.5-turbo, excelling in certain scenarios. Notably, it demonstrates a 41% improvement in generating syntactically correct Verilog code across various problem categories compared to its pre-trained counterpart, highlighting the potential of smaller, in-house LLMs in hardware design automation. We release our training/evaluation scripts and LLM checkpoints as open-source contributions.</description><subject>Computing methodologies</subject><subject>Hardware</subject><subject>Hardware description languages and compilation</subject><subject>Machine translation</subject><subject>Natural language processing</subject><issn>1084-4309</issn><issn>1557-7309</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2024</creationdate><recordtype>article</recordtype><recordid>eNo9jz1LxEAQhhdR8DzF3mo7q-jsZxKtjqCnELFR27AfsyGSy8rmLPz37nGnzczDOw8DLyGXDG4Yk-pWaCl0xY7IgilVFqWA-jgzVLKQmU_J2Tx_AoAqtVqQ-w9MwxqnO7qirUk95jn13ybDS_Q40hAT3Tlj7GmTE5plTGY7xOmcnAQzznhx2Evy_vjw1jwV7ev6uVm1heFluS2458Hb2stgnDAaRQ3ecQ5WgLWW1cFwVvlKMnReSoUBOfjKa8GlViprS3K9_-tSnOeEoftKw8akn45Bt-vcHTpn82pvGrf5l_6Ovy-pT78</recordid><startdate>20240422</startdate><enddate>20240422</enddate><creator>Thakur, Shailja</creator><creator>Ahmad, Baleegh</creator><creator>Pearce, Hammond</creator><creator>Tan, Benjamin</creator><creator>Dolan-Gavitt, Brendan</creator><creator>Karri, Ramesh</creator><creator>Garg, Siddharth</creator><general>ACM</general><scope>AAYXX</scope><scope>CITATION</scope><orcidid>https://orcid.org/0000-0002-7642-3638</orcidid><orcidid>https://orcid.org/0000-0001-9590-5061</orcidid><orcidid>https://orcid.org/0000-0002-8867-4282</orcidid><orcidid>https://orcid.org/0000-0002-6158-9512</orcidid><orcidid>https://orcid.org/0000-0001-6854-3966</orcidid><orcidid>https://orcid.org/0000-0002-3488-7004</orcidid><orcidid>https://orcid.org/0000-0001-7989-5617</orcidid></search><sort><creationdate>20240422</creationdate><title>VeriGen: A Large Language Model for Verilog Code Generation</title><author>Thakur, Shailja ; Ahmad, Baleegh ; Pearce, Hammond ; Tan, Benjamin ; Dolan-Gavitt, Brendan ; Karri, Ramesh ; Garg, Siddharth</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-a277t-2d2fdb9d4fac3a6e390dc220b30bbb19fa218d841ecd445efe20d8d63246550b3</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2024</creationdate><topic>Computing methodologies</topic><topic>Hardware</topic><topic>Hardware description languages and compilation</topic><topic>Machine translation</topic><topic>Natural language processing</topic><toplevel>peer_reviewed</toplevel><toplevel>online_resources</toplevel><creatorcontrib>Thakur, Shailja</creatorcontrib><creatorcontrib>Ahmad, Baleegh</creatorcontrib><creatorcontrib>Pearce, Hammond</creatorcontrib><creatorcontrib>Tan, Benjamin</creatorcontrib><creatorcontrib>Dolan-Gavitt, Brendan</creatorcontrib><creatorcontrib>Karri, Ramesh</creatorcontrib><creatorcontrib>Garg, Siddharth</creatorcontrib><collection>CrossRef</collection><jtitle>ACM transactions on design automation of electronic systems</jtitle></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Thakur, Shailja</au><au>Ahmad, Baleegh</au><au>Pearce, Hammond</au><au>Tan, Benjamin</au><au>Dolan-Gavitt, Brendan</au><au>Karri, Ramesh</au><au>Garg, Siddharth</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>VeriGen: A Large Language Model for Verilog Code Generation</atitle><jtitle>ACM transactions on design automation of electronic systems</jtitle><stitle>ACM TODAES</stitle><date>2024-04-22</date><risdate>2024</risdate><volume>29</volume><issue>3</issue><spage>1</spage><epage>31</epage><pages>1-31</pages><artnum>46</artnum><issn>1084-4309</issn><eissn>1557-7309</eissn><abstract>In this study, we explore the capability of Large Language Models (LLMs) to automate hardware design by automatically completing partial Verilog code, a common language for designing and modeling digital systems. We fine-tune pre-existing LLMs on Verilog datasets compiled from GitHub and Verilog textbooks. We evaluate the functional correctness of the generated Verilog code using a specially designed test suite, featuring a custom problem set and testing benches. Here, our fine-tuned open-source CodeGen-16B model outperforms the commercial state-of-the-art GPT-3.5-turbo model with a 1.1% overall increase. Upon testing with a more diverse and complex problem set, we find that the fine-tuned model shows competitive performance against state-of-the-art gpt-3.5-turbo, excelling in certain scenarios. Notably, it demonstrates a 41% improvement in generating syntactically correct Verilog code across various problem categories compared to its pre-trained counterpart, highlighting the potential of smaller, in-house LLMs in hardware design automation. We release our training/evaluation scripts and LLM checkpoints as open-source contributions.</abstract><cop>New York, NY</cop><pub>ACM</pub><doi>10.1145/3643681</doi><tpages>31</tpages><orcidid>https://orcid.org/0000-0002-7642-3638</orcidid><orcidid>https://orcid.org/0000-0001-9590-5061</orcidid><orcidid>https://orcid.org/0000-0002-8867-4282</orcidid><orcidid>https://orcid.org/0000-0002-6158-9512</orcidid><orcidid>https://orcid.org/0000-0001-6854-3966</orcidid><orcidid>https://orcid.org/0000-0002-3488-7004</orcidid><orcidid>https://orcid.org/0000-0001-7989-5617</orcidid><oa>free_for_read</oa></addata></record> |
fulltext | fulltext |
identifier | ISSN: 1084-4309 |
ispartof | ACM transactions on design automation of electronic systems, 2024-04, Vol.29 (3), p.1-31, Article 46 |
issn | 1084-4309 1557-7309 |
language | eng |
recordid | cdi_crossref_primary_10_1145_3643681 |
source | ACM Digital Library Complete |
subjects | Computing methodologies Hardware Hardware description languages and compilation Machine translation Natural language processing |
title | VeriGen: A Large Language Model for Verilog Code Generation |
url | https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-02-08T16%3A58%3A25IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-acm_cross&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=VeriGen:%20A%20Large%20Language%20Model%20for%20Verilog%20Code%20Generation&rft.jtitle=ACM%20transactions%20on%20design%20automation%20of%20electronic%20systems&rft.au=Thakur,%20Shailja&rft.date=2024-04-22&rft.volume=29&rft.issue=3&rft.spage=1&rft.epage=31&rft.pages=1-31&rft.artnum=46&rft.issn=1084-4309&rft.eissn=1557-7309&rft_id=info:doi/10.1145/3643681&rft_dat=%3Cacm_cross%3E3643681%3C/acm_cross%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_id=info:pmid/&rfr_iscdi=true |