Hey HN, I recently launched this GPT-2 API, and figured you'd be into it.<p>The goal is simplicity, so you hit the endpoint with a one-line call from the Python client.<p>Here's a demo of pip install, code, and use.
<a href="https://www.loom.com/share/c09c9ca228644345852544808decd864" rel="nofollow">https://www.loom.com/share/c09c9ca228644345852544808decd864</a><p>This API is the first API from <a href="https://www.booste.io" rel="nofollow">https://www.booste.io</a>, where my mission is to make the ML stack as simple as Stripe made the payments stack. One-line API clients.<p>Lots on the roadmap (Node client, using larger GPT-2 model, PPLM for long-content generation, running on GPUs, hosting other models such as BERT), but there's no time like the present to put something out there.<p>Let me know your thoughts :)<p>(edit: fixed link)
UPDATE: First time launching this to larger audience, and hitting infra limits. It's self healing, but please be patient if an error throws; try back in 3 minutes. I'm working to remedy it now.
Related, Fabrice Bellard developed a C program for GPT-2 inference. It's not open source, but the binary is free to download, and can use any pretrained GPT-2 model:<p><a href="https://bellard.org/nncp/gpt2tc.html" rel="nofollow">https://bellard.org/nncp/gpt2tc.html</a><p>I tried it using a GPT-2 model I'd finetuned, and it worked well.<p>I started making a simple chatbot with it using Python: at each step, I fed in the conversation so far, and a speaker prompt (e.g. PERSON2:), and read the output until I saw PERSON1: appear. Rinse and repeat.<p>Unfortunately, I got stuck with some text encoding issue between python and the CLI binary. I tried obvious things like forcing the decode to use UTF-8, but after a couple of steps I always ended up receiving some characters that weren't valid.<p>I didn't have this problem when running the binary from the command line, so it must have been something to do with how I was using python popen.
This looks very cool.<p>It says on the website "Predict the next word(s) from a given sequence of words." Speaking as someone who has very little programming knowledge, would it be possible to use this to create a gmail like auto-complete with this? If so, how can I make it so that the words generated resemble my own writing style (like gmail auto-complete does?).