{"id":192,"date":"2022-09-04T17:19:13","date_gmt":"2022-09-04T13:49:13","guid":{"rendered":"https:\/\/haghiri75.com\/en\/?p=192"},"modified":"2022-09-04T18:09:35","modified_gmt":"2022-09-04T14:39:35","slug":"i-was-to-cheap-to-pay-10-a-month-for-copilot-so-i-made-my-own","status":"publish","type":"post","link":"https:\/\/haghiri75.com\/en\/i-was-to-cheap-to-pay-10-a-month-for-copilot-so-i-made-my-own\/","title":{"rendered":"I was too cheap to pay $10 a month for copilot, so I made my own"},"content":{"rendered":"<p>In mid 2021, there was a revolution in coding. As a lazy programmer who always needed a fast and smart assistant, I was really happy to have <a href=\"https:\/\/github.com\/features\/copilot\">Github Copilot<\/a> in my arsenal of coding tools. So I was one of the early adapters of the whole idea of <em>AI pair programmer. <\/em><\/p>\n<p>Everything was fine with Copilot. I wrote tens of thousands of lines of code in last year and I could code a lot of projects which were impossible with a good, smart and fast pair programmers, but everything has been changed since last week I got an email from github, telling me I can&#8217;t have free access to Copilot anymore.<\/p>\n<p>It was a sad moment in my life, but I had different ways of adapting and accepting the reality. First, I was thinking of paying $10 a month for a github premium account, but since I won&#8217;t use most of github&#8217;s premium options, it wasn&#8217;t a suitable solution for me. I also checked tabnine or kite as well, and those didn&#8217;t work out for me, as well.<\/p>\n<p><img data-attachment-id=\"193\" data-permalink=\"https:\/\/haghiri75.com\/en\/i-was-to-cheap-to-pay-10-a-month-for-copilot-so-i-made-my-own\/screen-shot-2022-09-03-at-10-46-46-pm\/\" data-orig-file=\"https:\/\/haghiri75.com\/en\/wp-content\/uploads\/Screen-Shot-2022-09-03-at-10.46.46-PM.png\" data-orig-size=\"686,560\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screen Shot 2022-09-03 at 10.46.46 PM\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/haghiri75.com\/en\/wp-content\/uploads\/Screen-Shot-2022-09-03-at-10.46.46-PM-300x245.png\" data-large-file=\"https:\/\/haghiri75.com\/en\/wp-content\/uploads\/Screen-Shot-2022-09-03-at-10.46.46-PM.png\" decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-193\" src=\"http:\/\/haghiri75.com\/en\/wp-content\/uploads\/Screen-Shot-2022-09-03-at-10.46.46-PM.png\" alt=\"My own copilot!\" width=\"686\" height=\"560\" srcset=\"https:\/\/haghiri75.com\/en\/wp-content\/uploads\/Screen-Shot-2022-09-03-at-10.46.46-PM.png 686w, https:\/\/haghiri75.com\/en\/wp-content\/uploads\/Screen-Shot-2022-09-03-at-10.46.46-PM-300x245.png 300w\" sizes=\"(max-width: 686px) 100vw, 686px\" \/><\/p>\n<h1>Say hello to Severus, my new AI pair programmer!<\/h1>\n<p>First, let me talk about the name a little bit. I was watching <em>Harry Potter <\/em>franchise recently, and my favorite character in whole franchise is non other than <em><a href=\"https:\/\/harrypotter.fandom.com\/wiki\/Severus_Snape\">Severus Snape<\/a>.<\/em> So I named my AI pair programmer after him. But I know you might be curious about how I made it. So let&#8217;s find out!<\/p>\n<h2>The language model<\/h2>\n<p>First, I needed a <em>language model <\/em>which could be capable of generating code. At first, I had OpenAI&#8217;s GPT-3 in my mind but I remembered that for some reasons, I can&#8217;t use it. Then, I fell for <em>free <\/em>language models. I used GPT-J and although it could understand the code, it didn&#8217;t seem a very high-accuracy model to me.<\/p>\n<p>Then, I realized that Meta has released <a href=\"https:\/\/opt.alpa.ai\/\">OPT-175B<\/a> model. I put some of its functionalities to the test. It is a really perfect language model, but it works well when you use it as a core for a chatbot or a blog-post generator (or maybe a prompt engineering tool for <a href=\"https:\/\/haghiri75.com\/en\/revolutionizing-interior-design-with-artificial-intelligence\/\">Text-To-Image models<\/a>) but not a great code generator.<\/p>\n<p>Then, I found my saving angel. A lot of open-source engineers and enthusiasts of the world and it&#8217;s non other than <a href=\"https:\/\/huggingface.co\/bigscience\/bloom\">BigScience&#8217;s BLOOM<\/a>.<\/p>\n<p><img data-attachment-id=\"196\" data-permalink=\"https:\/\/haghiri75.com\/en\/i-was-to-cheap-to-pay-10-a-month-for-copilot-so-i-made-my-own\/bloom-logo\/\" data-orig-file=\"https:\/\/haghiri75.com\/en\/wp-content\/uploads\/bloom-logo.png\" data-orig-size=\"2112,652\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"bloom-logo\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/haghiri75.com\/en\/wp-content\/uploads\/bloom-logo-300x93.png\" data-large-file=\"https:\/\/haghiri75.com\/en\/wp-content\/uploads\/bloom-logo-1024x316.png\" decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-large wp-image-196\" src=\"http:\/\/haghiri75.com\/en\/wp-content\/uploads\/bloom-logo-1024x316.png\" alt=\"\" width=\"525\" height=\"162\" srcset=\"https:\/\/haghiri75.com\/en\/wp-content\/uploads\/bloom-logo-1024x316.png 1024w, https:\/\/haghiri75.com\/en\/wp-content\/uploads\/bloom-logo-300x93.png 300w, https:\/\/haghiri75.com\/en\/wp-content\/uploads\/bloom-logo-768x237.png 768w, https:\/\/haghiri75.com\/en\/wp-content\/uploads\/bloom-logo-1536x474.png 1536w, https:\/\/haghiri75.com\/en\/wp-content\/uploads\/bloom-logo-2048x632.png 2048w\" sizes=\"(max-width: 525px) 100vw, 525px\" \/><\/p>\n<h2>Code tests and inference<\/h2>\n<p>Like what most of you may have done, first I tried to complete a love story with the model. It was cool. Then I tried to create a friendly, a helpful, an idiot and an evil chatbot with the model. All worked out perfectly. Back then, I did not have any limitations to Copilot, so I didn&#8217;t care about the code generation.<\/p>\n<p>When I found out myself in misery of not having my beloved AI pair programmer, I tried some basic python code generation with BLOOM. It was fine, then I have tested PHP, Ruby and JavaScript as well. I found that it works pretty well, so I have decided to write a simple inference code over the API.<\/p>\n<h2>Code generation may go wrong<\/h2>\n<p>Since I didn&#8217;t fine-tune the model (and I don&#8217;t have resources to) it may glitch sometimes. For example, when you don&#8217;t really pay attention to your code formatting, it might generate <em>explanation<\/em> of the code.<\/p>\n<p>For me, what happened was that it started explaining the code in a tutorial format (and I bet the whole python codes were from towardsdatascience website since it had pretty similar literature).<\/p>\n<p>In general, I may need a solution for this, as well.<\/p>\n<h2>Will it be open source?<\/h2>\n<p>Yes. At least it&#8217;ll be partly open sourced in near future. But more than being open source, it will be free (as in non-paid) and I guess it may be a pro for the tool. I haven&#8217;t even paid a single penny on the model, so why should I make you pay for it? By the way I will be open for donations and technical helps from the community.<\/p>\n<h2>Future Plans<\/h2>\n<ul>\n<li>The API<\/li>\n<li>VSCode extension<\/li>\n<li>A community website (or discord server)<\/li>\n<\/ul>\n<h1>Conclusion<\/h1>\n<p>At the end, it seems we have a lot to do with these brand new language models. I found my way to create a free, reliable and smart AI pair programmer and of course I need some help in this way.<\/p>\n<p>I have to warmly thank you for the time you&#8217;ve spent to read my article, and I openly accept your comments and ideas.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In mid 2021, there was a revolution in coding. As a lazy programmer who always needed a fast and smart assistant, I was really happy to have Github Copilot in my arsenal of coding tools. So I was one of the early adapters of the whole idea of AI pair programmer. Everything was fine with &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/haghiri75.com\/en\/i-was-to-cheap-to-pay-10-a-month-for-copilot-so-i-made-my-own\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;I was too cheap to pay $10 a month for copilot, so I made my own&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[2],"tags":[37,39,38,11,22,45,46,24,25,49],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8BkKn-36","jetpack-related-posts":[{"id":202,"url":"https:\/\/haghiri75.com\/en\/severus-does-the-magic\/","url_meta":{"origin":192,"position":0},"title":"Severus does the magic","author":"prp-e","date":"September 11, 2022","format":false,"excerpt":"It is not too long after I told you that I was too cheap to pay $10 a month for github copilot and I came up with the idea for Severus, my own AI pair programmer. It was something that went boom. My blog usually doesn't have more than 20\u2026","rel":"","context":"In &quot;Computer Architecture &amp; Programming&quot;","block_context":{"text":"Computer Architecture &amp; Programming","link":"https:\/\/haghiri75.com\/en\/category\/computer\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/warforged_wizard_by_captdiablo_de2mwm8-pre-1024x724.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/warforged_wizard_by_captdiablo_de2mwm8-pre-1024x724.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/warforged_wizard_by_captdiablo_de2mwm8-pre-1024x724.jpg?resize=525%2C300 1.5x"},"classes":[]},{"id":318,"url":"https:\/\/haghiri75.com\/en\/frontbricks-my-llm-based-weekend-project-which-is-inspired-by-vercels-v0\/","url_meta":{"origin":192,"position":1},"title":"FrontBricks, my LLM-based weekend project which is inspired by Vercel&#8217;s V0","author":"prp-e","date":"May 31, 2024","format":false,"excerpt":"Since 2022, there is a hype of\u00a0generative artificial intelligence\u00a0and it resulted in a bunch of cool projects. Although a lot of us may remember that Github's copilot was much older. Those days, I wrote an article about how I was too cheap to pay $10 a month for copilot, so\u2026","rel":"","context":"In &quot;Computer Architecture &amp; Programming&quot;","block_context":{"text":"Computer Architecture &amp; Programming","link":"https:\/\/haghiri75.com\/en\/category\/computer\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/frontbricks.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/frontbricks.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/frontbricks.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/frontbricks.png?resize=700%2C400 2x, https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/frontbricks.png?resize=1050%2C600 3x"},"classes":[]},{"id":399,"url":"https:\/\/haghiri75.com\/en\/you-only-need-python-to-make-ai-agents\/","url_meta":{"origin":192,"position":2},"title":"You only need Python to make AI agents.","author":"prp-e","date":"December 31, 2024","format":false,"excerpt":"In 2022, ChatGPT released and LLMs becoming the hot topic of pretty much every technology related press, event, YouTube video, etc. It was like finding the secret ingredient to a potion which can make you immortal. But Meta didn't let OpenAI becoming the one and only. They also started the\u2026","rel":"","context":"In &quot;Projects&quot;","block_context":{"text":"Projects","link":"https:\/\/haghiri75.com\/en\/category\/projects\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mann-e-images.storage.c2.liara.space\/319996af-289a-4617-8d0c-6580e4793747.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/mann-e-images.storage.c2.liara.space\/319996af-289a-4617-8d0c-6580e4793747.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/mann-e-images.storage.c2.liara.space\/319996af-289a-4617-8d0c-6580e4793747.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/mann-e-images.storage.c2.liara.space\/319996af-289a-4617-8d0c-6580e4793747.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/mann-e-images.storage.c2.liara.space\/319996af-289a-4617-8d0c-6580e4793747.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":219,"url":"https:\/\/haghiri75.com\/en\/the-future-of-content-is-ai\/","url_meta":{"origin":192,"position":3},"title":"The future of content is AI","author":"prp-e","date":"November 19, 2022","format":false,"excerpt":"I personally never counted myself as a content creator but apparently, I always have been counted as one. Why you may ask? The answer is easy. I have a habit of filming my work, writing blog posts (mostly in Persian), posting my work and code on twitter and stuff. All\u2026","rel":"","context":"In &quot;Computer Architecture &amp; Programming&quot;","block_context":{"text":"Computer Architecture &amp; Programming","link":"https:\/\/haghiri75.com\/en\/category\/computer\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/3d-game-3_out-1024x1024.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/3d-game-3_out-1024x1024.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/3d-game-3_out-1024x1024.png?resize=525%2C300 1.5x"},"classes":[]},{"id":300,"url":"https:\/\/haghiri75.com\/en\/nucleus-is-the-proof-that-small-is-the-new-big\/","url_meta":{"origin":192,"position":4},"title":"Nucleus is the proof that &#8220;Small is the new Big&#8221;","author":"prp-e","date":"January 13, 2024","format":false,"excerpt":"No matter what you heard, size matters. Specially in the world of AI models, having a smaller and more affordable model is the key to win the competition. This is why Microsoft even invested time, GPU and money on Phi project, which is a Small Language Model or SLM for\u2026","rel":"","context":"In &quot;Computer Architecture &amp; Programming&quot;","block_context":{"text":"Computer Architecture &amp; Programming","link":"https:\/\/haghiri75.com\/en\/category\/computer\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/CEO.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/CEO.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/CEO.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/CEO.png?resize=700%2C400 2x"},"classes":[]},{"id":286,"url":"https:\/\/haghiri75.com\/en\/maral-is-here-7-billion-parameters-bilingual-model-with-support-of-persian\/","url_meta":{"origin":192,"position":5},"title":"Maral is here, 7 billion parameters bilingual model with support of Persian!","author":"prp-e","date":"December 28, 2023","format":false,"excerpt":"If you read my previous post, you know how much I like open source AI material, and I even jokingly titled my BLOOM post I was too cheap to pay for GitHub's copilot! So making an open source model was always one of my goals of life. Also, in my\u2026","rel":"","context":"In &quot;Computer Architecture &amp; Programming&quot;","block_context":{"text":"Computer Architecture &amp; Programming","link":"https:\/\/haghiri75.com\/en\/category\/computer\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/maral-featured-2.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/maral-featured-2.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/maral-featured-2.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/maral-featured-2.png?resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/posts\/192"}],"collection":[{"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/comments?post=192"}],"version-history":[{"count":7,"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/posts\/192\/revisions"}],"predecessor-version":[{"id":201,"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/posts\/192\/revisions\/201"}],"wp:attachment":[{"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/media?parent=192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/categories?post=192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/tags?post=192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}