{"id":13639256,"url":"https://github.com/oxford-cs-ml-2015/practical6","last_synced_at":"2026-01-22T15:26:59.460Z","repository":{"id":28471653,"uuid":"31987560","full_name":"oxford-cs-ml-2015/practical6","owner":"oxford-cs-ml-2015","description":"Practical 6: LSTM language models","archived":false,"fork":false,"pushed_at":"2015-06-09T13:29:49.000Z","size":355,"stargazers_count":260,"open_issues_count":2,"forks_count":84,"subscribers_count":30,"default_branch":"master","last_synced_at":"2024-08-03T01:14:14.182Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.cs.ox.ac.uk/people/nando.defreitas/machinelearning/","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oxford-cs-ml-2015.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-10T23:32:01.000Z","updated_at":"2024-07-14T18:54:18.000Z","dependencies_parsed_at":"2022-09-04T04:40:32.514Z","dependency_job_id":null,"html_url":"https://github.com/oxford-cs-ml-2015/practical6","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxford-cs-ml-2015%2Fpractical6","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxford-cs-ml-2015%2Fpractical6/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxford-cs-ml-2015%2Fpractical6/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxford-cs-ml-2015%2Fpractical6/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oxford-cs-ml-2015","download_url":"https://codeload.github.com/oxford-cs-ml-2015/practical6/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223810318,"owners_count":17206739,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T01:00:59.080Z","updated_at":"2026-01-22T15:26:59.424Z","avatar_url":"https://github.com/oxford-cs-ml-2015.png","language":"Lua","funding_links":[],"categories":["Sample Codes"],"sub_categories":[],"readme":"# Practical 6\nMachine Learning, spring 2015\n\nIn this practical, we train an LSTM for character-level language modelling. Since this is the last week for practicals, it will be **extremely short** and does not require writing code, and is due by the end of the Friday's session (regardless of whether you are from the Wednesday or Friday session).\n\nSee PDF for details.\n\n## Setup\nSetup will be the same as last time in practical 1. Please refer to the [practical 1 repository](https://github.com/oxford-cs-ml-2015/practical1), and run the script as instructed last time. If you get an error that `nngraph` is not installed, run:\n```\nluarocks install nngraph\n```\n\n# Do this before reading the pdf\nClone the practical **and** download the associated data:\n```\ngit clone https://github.com/oxford-cs-ml-2015/practical6.git\ncd practical6\nwget http://www.cs.ox.ac.uk/people/brendan.shillingford/teaching/practical6-data.tar.gz\ntar xvf practical6-data.tar.gz\n```\nand start training the model:\n```\nth train.lua -vocabfile vocab.t7 -datafile train.t7 \n```\n**Make note of** the time at which you run the `train.lua` script. Every several iterations, the training script will save the current model (including its parameters) to a file called `model_autosave.t7`. You can make snapshots of this file if you want, but this is not required for the practical.\n\n# For users outside of Oxford's CS lab\nThe `practical6-data.tar.gz` file is for 64-bit little-endian CPUs. For all other machines (i.e. if running `uname -m` doesn't print out `x86_64`), then see this comment for instructions:\n\u003chttps://github.com/oxford-cs-ml-2015/practical6/commit/96749c8d9bc93f864c94c048a3c8cd73f59f733b#commitcomment-11003337\u003e. This is the same data, but using ASCII serialization.\nYou may also want to use this faster LSTM factory method, instead of the one in this repository: \u003chttps://gist.github.com/karpathy/7bae8033dcf5ca2630ba\u003e which performs all the matrix multiplications at once followed by several `nn.Narrow` operations to extract out the gate values; read its comments for details.\n\n# See course page for practicals\n\u003chttps://www.cs.ox.ac.uk/people/nando.defreitas/machinelearning/\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxford-cs-ml-2015%2Fpractical6","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foxford-cs-ml-2015%2Fpractical6","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxford-cs-ml-2015%2Fpractical6/lists"}