Skip to content

Chi-Shan0707/microgpt.cpp

Repository files navigation

Inspired by Karpathy

Introduction

This repository gives a c++ version of microgpt.py

  • microgpt.py : Karpathy's original code
  • microgpt_annotated.py: code with comments and notes by AI
  • microgpt_runnable.cpp: my (m)c++ version of microgpt; it's runnable, but not elegant and readable enough
  • microgpt.cpp: a concise and readable version (it is underway)

Requirements

  • python: no dependencies
  • c++: >= C++11

Interesting tasks #0

  • Generate English names

Example:

=== Generated samples ===
  [0] halin
  [1] pavalee
  [2] aliiah
  [3] zariay
  [4] eimola
  [5] alia
  [6] karana
  [7] arelia
  [8] kalina
  [9] jona
  [10] ekana
  [11] aibiya
  [12] kaulii
  [13] ary
  [14] belia
  [15] sin
  [16] jaza
  [17] maranah
  [18] milena
  [19] kano

Interesting tasks #1

  • 1+1=?

Example:

=== Generated samples ===
  [0] 883+514=1046
  [1] 932+854=1621
  [2] 786+045=1536
  [3] 606+202=446
  [4] 0=2+432=987
  [5] 18+527=501
  [6] 256+341=853
  [7] 988+86=368
  [8] 281+408=1429
  [9] 726+308=636
  [10] 392+59=169
  [11] 888+538=1358
  [12] 354+457=1338
  [13] 57+124=743
  [14] 34+139=125
  [15] 543+870=1158
  [16] 851+298=1926
  [17] 536+342=869
  [18] 350+256=1622
  [19] 228+984=1220

About

Runnable microgpt_runnable.cpp (I will make it more elegant)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors