tictactoe-gpt-finetuning


Nametictactoe-gpt-finetuning JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/pesvut/tictactoe-gpt-finetuning
SummaryPython tic tac toe state generator and GPT fine tuning
upload_time2023-01-16 23:08:55
maintainer
docs_urlNone
authorNicky Pochinkov
requires_python
licenseMIT
keywords tictactoe llm language-models
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            TicTacToe GPT Finetuning
========================

Simple python implementation of Tic Tac Toe.

Designed to make GPT able to recognize valid moves in Tic Tac Toe

::

   $ pip install tictactoe-gpt-finetuning

Examples
--------

Generate a game:

.. code:: python

    from tictactoe_gpt_finetuning import tictactoe
    print( tictactoe.generate_random_game() )

Generate many games:

.. code:: python

    from tictactoe_gpt_finetuning import tictactoe
    print( tictactoe.generate_n_games() )

Initialize and use the game board to place in top left:

.. code:: python

    from tictactoe_gpt_finetuning import tictactoe
    b = tictactoe.BoardState()
    b.make_move( 0, 0, 'x' )
    print( b )
    # output:
    # x - -
    # - - -
    # - - -

Train a Model
-------------

We can compare inputs to outputs of the model, and compare
predictions of the model before and after finetuning.

.. code:: python

    from tictactoe import Model, finetune, compare_tictactoe_predictions
    gpt = Model()

    # See what predictions look like before finetuning
    compare_tictactoe_predictions( gpt )

    # Fine-tune the model
    finetune( gpt, n_epochs=10 )

    # See what new predictions look like after finetuning
    compare_tictactoe_predictions


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pesvut/tictactoe-gpt-finetuning",
    "name": "tictactoe-gpt-finetuning",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "tictactoe,llm,language-models",
    "author": "Nicky Pochinkov",
    "author_email": "work@nicky.pro",
    "download_url": "https://files.pythonhosted.org/packages/f6/8f/1e64cdedf60ffef82158c690e1725b2f43746d6d305f398aca7309e07a2e/tictactoe-gpt-finetuning-0.1.3.tar.gz",
    "platform": null,
    "description": "TicTacToe GPT Finetuning\n========================\n\nSimple python implementation of Tic Tac Toe.\n\nDesigned to make GPT able to recognize valid moves in Tic Tac Toe\n\n::\n\n   $ pip install tictactoe-gpt-finetuning\n\nExamples\n--------\n\nGenerate a game:\n\n.. code:: python\n\n    from tictactoe_gpt_finetuning import tictactoe\n    print( tictactoe.generate_random_game() )\n\nGenerate many games:\n\n.. code:: python\n\n    from tictactoe_gpt_finetuning import tictactoe\n    print( tictactoe.generate_n_games() )\n\nInitialize and use the game board to place in top left:\n\n.. code:: python\n\n    from tictactoe_gpt_finetuning import tictactoe\n    b = tictactoe.BoardState()\n    b.make_move( 0, 0, 'x' )\n    print( b )\n    # output:\n    # x - -\n    # - - -\n    # - - -\n\nTrain a Model\n-------------\n\nWe can compare inputs to outputs of the model, and compare\npredictions of the model before and after finetuning.\n\n.. code:: python\n\n    from tictactoe import Model, finetune, compare_tictactoe_predictions\n    gpt = Model()\n\n    # See what predictions look like before finetuning\n    compare_tictactoe_predictions( gpt )\n\n    # Fine-tune the model\n    finetune( gpt, n_epochs=10 )\n\n    # See what new predictions look like after finetuning\n    compare_tictactoe_predictions\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python tic tac toe state generator and GPT fine tuning",
    "version": "0.1.3",
    "split_keywords": [
        "tictactoe",
        "llm",
        "language-models"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f68f1e64cdedf60ffef82158c690e1725b2f43746d6d305f398aca7309e07a2e",
                "md5": "55c57ce1a4b533e881458f067c6c9abb",
                "sha256": "f376d792a80aa0e322fbc2d9e08c7ebda83e87c29d6f3d30d63aef5dcccbca5d"
            },
            "downloads": -1,
            "filename": "tictactoe-gpt-finetuning-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "55c57ce1a4b533e881458f067c6c9abb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5230,
            "upload_time": "2023-01-16T23:08:55",
            "upload_time_iso_8601": "2023-01-16T23:08:55.208333Z",
            "url": "https://files.pythonhosted.org/packages/f6/8f/1e64cdedf60ffef82158c690e1725b2f43746d6d305f398aca7309e07a2e/tictactoe-gpt-finetuning-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-16 23:08:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "pesvut",
    "github_project": "tictactoe-gpt-finetuning",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "tictactoe-gpt-finetuning"
}
        
Elapsed time: 0.05179s