[{"data":1,"prerenderedAt":335},["ShallowReactive",2],{"project-23223358":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":44,"post_text":46,"what":47,"said":99,"maker_in_thread":185,"shape":195,"grid":199,"attempts":297,"same_week":298,"maker_shows":33,"maker_hidden":327,"reader_version":328,"card":329},"23223358","aitextgen","A Python tool for text-based AI training and generation using GPT-2","title","Show HN: A Python tool for text-based AI training and generation using GPT-2","https:\u002F\u002Fgithub.com\u002Fminimaxir\u002Faitextgen","github.com","minimaxir",1589814957,2020,174,41,339,3028,12,"notable","ai","text generation library","library",[24,25,26,27,28],"gpt-2","text generation","fine-tuning","pytorch","language model","curious",0.244,{"positive":32,"neutral":33,"mixed":34,"critical":35},8,13,0,3,24,{"docs":38,"execution":40,"design":41,"performance":42,"idea":43},{"positive":39,"critical":34},1,{"positive":34,"critical":39},{"positive":39,"critical":34},{"positive":34,"critical":39},{"positive":34,"critical":39},[34,34,34,34,34,35,35,35,34,39,34,45,45,45,35,34,35,34,35,34,45,35,34,35,34,39,34,35,45,34,35,34,35,34,45,35,34,45,45,39],5,null,{"problem":48,"audience":59,"pricing":46,"motivation":68,"time_to_build":46,"stack":75,"openness":96,"stage":97,"team_size":98},{"value":49,"source":50,"evidence":51},"Easier training and text generation with GPT-2 models.","inferred",[52,56],{"id":53,"by":54,"text":55},"23226206","simonw","I've been following minimaxir's work with GPT-2 for a while - I've tried building things on https:\u002F\u002Fgithub.com\u002Fminimaxir\u002Fgpt-2-simple for example - and this looks like a HUGE…",{"id":57,"by":11,"text":58},"23226492","> Do these memory management improvements make it possible to fine-tune a larger one? Unfortunately not yet; I need to implement gradient checkpointing first. Memory-wise, the…",{"value":60,"source":61,"evidence":62},"Developers and NLP practitioners using GPT-2.","commenter",[63,67],{"id":64,"by":65,"text":66},"23228926","starskublue","Awesome work! Whenever people tell me they want to get started with NLP I tell them to play around with your libraries as they're the easiest way to immediately start doing cool…",{"id":53,"by":54,"text":55},{"value":69,"source":70,"evidence":71},"Intermediate step toward productionizing text generation; gpt-2-simple had issues.","maker",[72],{"id":73,"by":11,"text":74},"23225009","I intend to productionize text generation, and this is a necessary intermediate step. (gpt-2-simple had too many issues in this area so I needed to start from scratch)",[76,82,88,92],{"value":77,"source":70,"evidence":78},"Python",[79],{"id":80,"by":11,"text":81},"23223363","For fun, here's a little demo of aitextgen that you can run on your own computer. First install aitextgen: ``` pip3 install aitextgen ``` Then you can download and generate from…",{"value":83,"source":70,"evidence":84},"PyTorch",[85],{"id":86,"by":11,"text":87},"23228016","I talk about deviations from previous approaches in the DESIGN doc (https:\u002F\u002Fgithub.com\u002Fminimaxir\u002Faitextgen\u002Fblob\u002Fmaster\u002FDESIGN.md), but to answer the difference between aitextgen…",{"value":89,"source":70,"evidence":90},"PyTorch Lightning",[91],{"id":86,"by":11,"text":87},{"value":93,"source":70,"evidence":94},"HuggingFace Transformers",[95],{"id":86,"by":11,"text":87},"open_source","beta","unknown",{"praise":100,"objections":123,"requests":139,"questions":155,"alternatives":176},[101,109,116],{"value":102,"source":61,"evidence":103},"Clean, developer-friendly API and usability",[104,108],{"id":105,"by":106,"text":107},"23227415","alphagrep12345","Your API looks really clean but what's the difference between this and just GPT-2 (or) HuggingFace's implementations?",{"id":53,"by":54,"text":55},{"value":110,"source":61,"evidence":111},"Well-written, newbie-friendly guide",[112],{"id":113,"by":114,"text":115},"23246306","superasn","This is just brilliant. For someone who has little working knowledge but has massive interest in this field I found your guide exceptionally well written and newbie friendly (the…",{"value":117,"source":61,"evidence":118},"Faster generation and better memory efficiency than gpt-2-simple",[119],{"id":120,"by":121,"text":122},"23226358","neoncontrails","Huge fan of your gpt2-simple library, which I used to train a satirical news generator in a Colab notebook:…",[124,132],{"value":125,"source":61,"evidence":126},"Unclear how it differs from HuggingFace Transformers",[127,128],{"id":105,"by":106,"text":107},{"id":129,"by":130,"text":131},"23229490","master_yoda_1","One question: Why put more sh!!t on top of huggingface already really good code?",{"value":133,"source":70,"evidence":134},"Fine-tuning large models and large datasets not yet supported",[135,136],{"id":57,"by":11,"text":58},{"id":137,"by":11,"text":138},"23236619","~50-100G isn't \"some\" text data. The original GPT-2 was trained on 40G of text data. I'm not 100% sure you can encode and store that much data in memory with the current…",[140,148],{"value":141,"source":61,"evidence":142},"Gradient checkpointing for fine-tuning larger models",[143,144],{"id":120,"by":121,"text":122},{"id":145,"by":146,"text":147},"23231321","britmob","Have I been using gpt-2-simple wrong..? I’ve been fine-tuning 355M on a 8GB 1080 for months..",{"value":149,"source":61,"evidence":150},"Support for parentheses in the prompt argument",[151],{"id":152,"by":153,"text":154},"23231993","totetsu","I get a source.error(\"unbalanced parenthesis\") if I put unbalanced parentheses in the --prompt \"argument)\"",[156,162,169],{"value":157,"source":61,"evidence":158},"How to download the models",[159],{"id":160,"by":153,"text":161},"23231789","how does one download these models?",{"value":163,"source":61,"evidence":164},"Whether training data size of 50-100G is feasible",[165],{"id":166,"by":167,"text":168},"23233460","IanCal","This looks great! If I want to fine-tune this to some text data, are there obvious constraints to be aware of? I've got a reasonable amount of text (~50-100G) but seeing that…",{"value":170,"source":61,"evidence":171},"Whether the model can be embedded on a Raspberry Pi",[172],{"id":173,"by":174,"text":175},"23227297","jakearmitage","Does anyone know an efficient way to \"embed\" models like this? I'm currently working in a Tamagotchi-style RPI toy and I use GPT-2 to generate answers to the chat. I wrote a…",[177,182],{"value":178,"source":61,"evidence":179},"gpt-2-simple",[180,181],{"id":120,"by":121,"text":122},{"id":53,"by":54,"text":55},{"value":93,"source":61,"evidence":183},[184],{"id":105,"by":106,"text":107},{"comments":186,"answered":32,"key":187},11,[188,189,192],{"id":80,"text":81},{"id":190,"text":191},"23236570","Seems you figured it out, but for posterity, it will automatically download the models if not cached.",{"id":193,"text":194},"23236540","Likely same issue as here: https:\u002F\u002Fgithub.com\u002Fminimaxir\u002Faitextgen\u002Fissues\u002F8 Will take a look.",{"commenters":196,"max_depth":197,"maker_replies":186,"first_comment_mins":34,"lifespan_hours":198},23,4,49,[200,202,206,209,212,214,215,217,220,222,224,226,228,231,233,235,236,237,239,240,241,243,246,247,249,252,256,258,261,265,267,272,273,276,278,281,283,286,290,292,294],[80,34,34,201,11,39],"project\u002Fneutral\u002Fdocs",[203,34,34,204,205,34],"23225577","other\u002Fneutral\u002Fnone","ideashower",[207,34,34,204,208,34],"23226869","contravariant",[210,34,34,204,211,34],"23229393","ttul",[213,34,34,204,167,34],"23248271",[160,34,35,201,153,34],[216,34,35,201,153,34],"23231893",[218,34,35,219,153,34],"23231940","project\u002Fneutral\u002Fnone",[190,34,34,221,11,39],"maker\u002Fneutral\u002Fdocs",[152,34,39,223,153,34],"project\u002Fcritical\u002Fexecution",[193,34,34,225,11,39],"maker\u002Fneutral\u002Fexecution",[53,39,45,227,54,34],"project\u002Fpositive\u002Fdesign",[113,229,45,230,114,34],2,"project\u002Fpositive\u002Fdocs",[64,35,45,232,65,34],"maker\u002Fpositive\u002Fnone",[120,197,35,234,121,34],"project\u002Fneutral\u002Fperformance",[57,197,34,234,11,39],[145,197,35,234,146,34],[238,197,34,234,11,39],"23231331",[166,45,35,234,167,34],[137,45,34,234,11,39],[242,45,45,232,167,34],"23248170",[105,244,35,245,106,34],6,"project\u002Fneutral\u002Fidea",[86,244,34,245,11,39],[173,248,35,219,174,34],7,[250,248,34,251,106,34],"23227349","commenter\u002Fneutral\u002Fnone",[253,248,39,254,255,34],"23227514","project\u002Fcritical\u002Fperformance","Voloskaya",[257,248,34,234,11,39],"23228115",[259,248,35,219,260,34],"23239618","gremlinsinc",[262,32,45,263,264,34],"23226345","project\u002Fpositive\u002Fnone","brendanfalk",[266,32,34,204,11,39],"23226558",[268,269,35,270,271,34],"23224555",9,"maker\u002Fneutral\u002Fnone","harshalaxman",[73,269,34,245,11,39],[274,269,35,270,275,34],"23225875","jramz",[277,269,34,219,11,39],"23226036",[279,269,45,263,280,34],"23225624","dustincoates",[282,269,35,245,211,34],"23229408",[284,269,34,204,285,34],"23229948","abiogenesis",[287,288,45,263,289,34],"23224277",10,"cedyf",[291,186,45,232,146,34],"23229918",[129,18,39,293,130,34],"project\u002Fcritical\u002Fidea",[295,33,35,219,296,34],"23233470","IRegretNothing",[],[299,304,308,313,318,323],{"id":300,"name":301,"points":302,"category":303},"23209142","toro",551,"finance_crypto",{"id":305,"name":306,"points":307,"category":303},"23190921","senator-filings",350,{"id":309,"name":310,"points":311,"category":312},"23205579","XP.css",297,"dev_tools",{"id":314,"name":315,"points":316,"category":317},"23180298","Virtual Reality DOS",206,"games",{"id":319,"name":320,"points":321,"category":322},"23215360","Career Fair",161,"productivity",{"id":324,"name":325,"points":326,"category":322},"23204641","bookmark_ui_demo",124,false,"v2",{"id":330,"name":5,"line":6,"ai":327,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":331,"top":18,"kw":332,"maker":11,"domain":10,"tier":19,"attempts":34,"strip":333,"url":9,"mix":334,"praise":102,"objection":125,"sub":21},23223358,0.24,[24,25,26,27,28],"0000033301055530303053030103503030530551",[32,33,34,35],1794036590703]