├── trl ├── tests │ ├── __init__.py │ ├── slow │ │ └── __init__.py │ └── test_e2e.py ├── trl │ ├── environment │ │ └── __init__.py │ └── extras │ │ └── __init__.py ├── requirements.txt ├── examples │ ├── README.md │ ├── research_projects │ │ ├── stack_llama_2 │ │ │ └── scripts │ │ │ │ └── requirements.txt │ │ ├── toxicity │ │ │ └── README.md │ │ └── README.md │ ├── accelerate_configs │ │ ├── multi_gpu.yaml │ │ ├── single_gpu.yaml │ │ ├── deepspeed_zero1.yaml │ │ ├── deepspeed_zero2.yaml │ │ └── deepspeed_zero3.yaml │ └── notebooks │ │ └── README.md ├── MANIFEST.in ├── setup.cfg ├── benchmark │ ├── post_github_comment.sbatch │ ├── benchmark_level1.sh │ ├── upload_benchmark.py │ └── trl.slurm_template ├── pyproject.toml └── docs │ └── source │ └── installation.mdx ├── alignment-handbook ├── tests │ └── __init__.py ├── node_modules │ ├── resolve │ │ ├── test │ │ │ ├── resolver │ │ │ │ ├── mug.js │ │ │ │ ├── baz │ │ │ │ │ ├── doom.js │ │ │ │ │ ├── quux.js │ │ │ │ │ └── package.json │ │ │ │ ├── mug.coffee │ │ │ │ ├── browser_field │ │ │ │ │ ├── a.js │ │ │ │ │ ├── b.js │ │ │ │ │ └── package.json │ │ │ │ ├── cup.coffee │ │ │ │ ├── false_main │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ │ ├── other_path │ │ │ │ │ └── root.js │ │ │ │ ├── foo.js │ │ │ │ ├── symlinked │ │ │ │ │ ├── _ │ │ │ │ │ │ ├── node_modules │ │ │ │ │ │ │ └── foo.js │ │ │ │ │ │ └── symlink_target │ │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ └── package │ │ │ │ │ │ ├── bar.js │ │ │ │ │ │ └── package.json │ │ │ │ ├── multirepo │ │ │ │ │ ├── packages │ │ │ │ │ │ ├── package-b │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── package.json │ │ │ │ │ │ └── package-a │ │ │ │ │ │ │ └── package.json │ │ │ │ │ ├── lerna.json │ │ │ │ │ └── package.json │ │ │ │ ├── dot_main │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ │ ├── quux │ │ │ │ │ └── foo │ │ │ │ │ │ └── index.js │ │ │ │ ├── same_names │ │ │ │ │ ├── foo.js │ │ │ │ │ └── foo │ │ │ │ │ │ └── index.js │ │ │ │ ├── dot_slash_main │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ │ ├── incorrect_main │ │ │ │ │ ├── package.json │ │ │ │ │ └── index.js │ │ │ │ ├── invalid_main │ │ │ │ │ └── package.json │ │ │ │ ├── without_basedir │ │ │ │ │ └── main.js │ │ │ │ └── nested_symlinks │ │ │ │ │ └── mylib │ │ │ │ │ ├── package.json │ │ │ │ │ └── sync.js │ │ │ ├── pathfilter │ │ │ │ └── deep_ref │ │ │ │ │ └── main.js │ │ │ ├── shadowed_core │ │ │ │ └── node_modules │ │ │ │ │ └── util │ │ │ │ │ └── index.js │ │ │ ├── dotdot │ │ │ │ ├── index.js │ │ │ │ └── abc │ │ │ │ │ └── index.js │ │ │ ├── precedence │ │ │ │ ├── aaa.js │ │ │ │ ├── bbb.js │ │ │ │ ├── aaa │ │ │ │ │ ├── index.js │ │ │ │ │ └── main.js │ │ │ │ └── bbb │ │ │ │ │ └── main.js │ │ │ ├── node_path │ │ │ │ ├── x │ │ │ │ │ ├── aaa │ │ │ │ │ │ └── index.js │ │ │ │ │ └── ccc │ │ │ │ │ │ └── index.js │ │ │ │ └── y │ │ │ │ │ ├── bbb │ │ │ │ │ └── index.js │ │ │ │ │ └── ccc │ │ │ │ │ └── index.js │ │ │ ├── module_dir │ │ │ │ ├── zmodules │ │ │ │ │ └── bbb │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── main.js │ │ │ │ ├── xmodules │ │ │ │ │ └── aaa │ │ │ │ │ │ └── index.js │ │ │ │ └── ymodules │ │ │ │ │ └── aaa │ │ │ │ │ └── index.js │ │ │ ├── nonstring.js │ │ │ ├── subdirs.js │ │ │ └── precedence.js │ │ ├── async.js │ │ ├── sync.js │ │ ├── example │ │ │ ├── sync.js │ │ │ └── async.js │ │ ├── SECURITY.md │ │ ├── index.js │ │ ├── .github │ │ │ └── FUNDING.yml │ │ └── .editorconfig │ ├── tailwindcss │ │ ├── stubs │ │ │ ├── .npmignore │ │ │ ├── tailwind.config.js │ │ │ ├── tailwind.config.cjs │ │ │ ├── tailwind.config.ts │ │ │ ├── postcss.config.js │ │ │ ├── config.simple.js │ │ │ ├── postcss.config.cjs │ │ │ └── .prettierrc.json │ │ ├── types │ │ │ ├── generated │ │ │ │ └── .gitkeep │ │ │ └── index.d.ts │ │ ├── base.css │ │ ├── screens.css │ │ ├── utilities.css │ │ ├── variants.css │ │ ├── components.css │ │ ├── src │ │ │ ├── index.js │ │ │ ├── cli.js │ │ │ ├── util │ │ │ │ ├── tap.js │ │ │ │ ├── bigSign.js │ │ │ │ ├── escapeCommas.js │ │ │ │ ├── hashConfig.js │ │ │ │ ├── toColorValue.js │ │ │ │ ├── isKeyframeRule.js │ │ │ │ ├── escapeClassName.js │ │ │ │ ├── isPlainObject.js │ │ │ │ ├── responsive.js │ │ │ │ ├── cloneDeep.js │ │ │ │ ├── defaults.js │ │ │ │ ├── flattenColorPalette.js │ │ │ │ ├── parseObjectStyles.js │ │ │ │ ├── parseGlob.js │ │ │ │ ├── buildMediaQuery.js │ │ │ │ ├── configurePlugins.js │ │ │ │ ├── nameClass.js │ │ │ │ ├── removeAlphaVariables.js │ │ │ │ └── createPlugin.js │ │ │ ├── public │ │ │ │ ├── load-config.js │ │ │ │ ├── create-plugin.js │ │ │ │ ├── default-config.js │ │ │ │ ├── default-theme.js │ │ │ │ └── resolve-config.js │ │ │ ├── value-parser │ │ │ │ ├── README.md │ │ │ │ ├── walk.js │ │ │ │ └── index.js │ │ │ ├── postcss-plugins │ │ │ │ └── nesting │ │ │ │ │ └── index.js │ │ │ └── cli-peer-dependencies.js │ │ ├── tailwind.css │ │ ├── defaultConfig.d.ts │ │ ├── colors.d.ts │ │ ├── colors.js │ │ ├── loadConfig.d.ts │ │ ├── nesting │ │ │ ├── index.js │ │ │ └── index.d.ts │ │ ├── loadConfig.js │ │ ├── plugin.js │ │ ├── defaultTheme.js │ │ ├── defaultConfig.js │ │ ├── resolveConfig.js │ │ ├── defaultTheme.d.ts │ │ ├── scripts │ │ │ ├── create-plugin-list.js │ │ │ ├── release-channel.js │ │ │ ├── type-utils.js │ │ │ └── release-notes.js │ │ ├── plugin.d.ts │ │ └── prettier.config.js │ ├── any-promise │ │ ├── register │ │ │ ├── q.d.ts │ │ │ ├── lie.d.ts │ │ │ ├── pinkie.d.ts │ │ │ ├── rsvp.d.ts │ │ │ ├── vow.d.ts │ │ │ ├── when.d.ts │ │ │ ├── bluebird.d.ts │ │ │ ├── es6-promise.d.ts │ │ │ ├── promise.d.ts │ │ │ ├── native-promise-only.d.ts │ │ │ ├── lie.js │ │ │ ├── q.js │ │ │ ├── pinkie.js │ │ │ ├── vow.js │ │ │ ├── bluebird.js │ │ │ ├── promise.js │ │ │ ├── rsvp.js │ │ │ ├── when.js │ │ │ ├── es6-promise.js │ │ │ └── native-promise-only.js │ │ ├── .jshintrc │ │ ├── index.js │ │ ├── implementation.js │ │ ├── implementation.d.ts │ │ ├── .npmignore │ │ ├── optional.js │ │ ├── register.d.ts │ │ └── register-shim.js │ ├── isexe │ │ ├── .npmignore │ │ └── LICENSE │ ├── yaml │ │ ├── browser │ │ │ ├── package.json │ │ │ └── index.js │ │ ├── util.js │ │ ├── bin.mjs │ │ └── LICENSE │ ├── sucrase │ │ ├── register │ │ │ ├── js.js │ │ │ ├── jsx.js │ │ │ ├── ts.js │ │ │ ├── tsx.js │ │ │ ├── index.js │ │ │ ├── ts-legacy-module-interop.js │ │ │ └── tsx-legacy-module-interop.js │ │ └── bin │ │ │ ├── sucrase │ │ │ └── sucrase-node │ ├── jiti │ │ ├── register.js │ │ └── bin │ │ │ └── jiti.js │ ├── reusify │ │ ├── .coveralls.yml │ │ ├── benchmarks │ │ │ ├── fib.js │ │ │ └── createNoCodeFunction.js │ │ ├── .travis.yml │ │ └── reusify.js │ ├── shebang-regex │ │ ├── index.js │ │ ├── index.d.ts │ │ ├── package.json │ │ └── readme.md │ ├── .bin │ │ ├── sucrase │ │ ├── yaml │ │ ├── jiti │ │ ├── autoprefixer │ │ └── sucrase-node │ ├── hasown │ │ ├── .eslintrc │ │ ├── tsconfig.json │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── .nycrc │ │ └── .github │ │ │ └── FUNDING.yml │ ├── binary-extensions │ │ ├── index.js │ │ ├── binary-extensions.json.d.ts │ │ ├── index.d.ts │ │ └── readme.md │ ├── @nodelib │ │ ├── fs.scandir │ │ │ └── out │ │ │ │ ├── utils │ │ │ │ ├── index.d.ts │ │ │ │ ├── fs.d.ts │ │ │ │ ├── index.js │ │ │ │ └── fs.js │ │ │ │ ├── types │ │ │ │ ├── index.js │ │ │ │ └── index.d.ts │ │ │ │ ├── providers │ │ │ │ ├── common.d.ts │ │ │ │ ├── sync.d.ts │ │ │ │ ├── common.js │ │ │ │ └── async.d.ts │ │ │ │ ├── constants.d.ts │ │ │ │ ├── adapters │ │ │ │ └── fs.js │ │ │ │ └── settings.d.ts │ │ ├── fs.stat │ │ │ └── out │ │ │ │ ├── types │ │ │ │ ├── index.js │ │ │ │ └── index.d.ts │ │ │ │ ├── providers │ │ │ │ ├── sync.d.ts │ │ │ │ ├── async.d.ts │ │ │ │ └── sync.js │ │ │ │ ├── settings.d.ts │ │ │ │ ├── adapters │ │ │ │ ├── fs.js │ │ │ │ └── fs.d.ts │ │ │ │ └── settings.js │ │ └── fs.walk │ │ │ └── out │ │ │ ├── types │ │ │ ├── index.js │ │ │ └── index.d.ts │ │ │ ├── providers │ │ │ ├── index.d.ts │ │ │ ├── sync.d.ts │ │ │ ├── index.js │ │ │ ├── stream.d.ts │ │ │ ├── sync.js │ │ │ └── async.d.ts │ │ │ └── readers │ │ │ ├── reader.d.ts │ │ │ ├── reader.js │ │ │ ├── common.d.ts │ │ │ └── sync.d.ts │ ├── picomatch │ │ └── index.js │ ├── balanced-match │ │ └── .github │ │ │ └── FUNDING.yml │ ├── supports-preserve-symlinks-flag │ │ ├── browser.js │ │ ├── .nycrc │ │ ├── .eslintrc │ │ ├── index.js │ │ └── .github │ │ │ └── FUNDING.yml │ ├── brace-expansion │ │ └── .github │ │ │ └── FUNDING.yml │ ├── fast-glob │ │ ├── out │ │ │ ├── types │ │ │ │ └── index.js │ │ │ ├── utils │ │ │ │ ├── errno.d.ts │ │ │ │ ├── string.d.ts │ │ │ │ ├── array.d.ts │ │ │ │ ├── stream.d.ts │ │ │ │ ├── fs.d.ts │ │ │ │ ├── errno.js │ │ │ │ ├── index.d.ts │ │ │ │ ├── string.js │ │ │ │ ├── index.js │ │ │ │ ├── stream.js │ │ │ │ ├── array.js │ │ │ │ ├── path.d.ts │ │ │ │ └── fs.js │ │ │ ├── providers │ │ │ │ ├── matchers │ │ │ │ │ └── partial.d.ts │ │ │ │ ├── filters │ │ │ │ │ ├── error.d.ts │ │ │ │ │ ├── error.js │ │ │ │ │ ├── entry.d.ts │ │ │ │ │ └── deep.d.ts │ │ │ │ ├── transformers │ │ │ │ │ └── entry.d.ts │ │ │ │ ├── sync.d.ts │ │ │ │ ├── async.d.ts │ │ │ │ └── stream.d.ts │ │ │ └── readers │ │ │ │ ├── async.d.ts │ │ │ │ ├── sync.d.ts │ │ │ │ ├── stream.d.ts │ │ │ │ └── reader.d.ts │ │ └── node_modules │ │ │ └── glob-parent │ │ │ └── LICENSE │ ├── queue-microtask │ │ ├── index.d.ts │ │ └── index.js │ ├── emoji-regex │ │ ├── index.d.ts │ │ ├── text.d.ts │ │ ├── RGI_Emoji.d.ts │ │ └── es2015 │ │ │ ├── index.d.ts │ │ │ ├── text.d.ts │ │ │ └── RGI_Emoji.d.ts │ ├── nanoid │ │ ├── non-secure │ │ │ ├── package.json │ │ │ ├── index.js │ │ │ └── index.cjs │ │ ├── url-alphabet │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── index.cjs │ │ ├── nanoid.js │ │ └── async │ │ │ └── package.json │ ├── mz │ │ ├── child_process.js │ │ ├── crypto.js │ │ ├── index.js │ │ ├── zlib.js │ │ └── dns.js │ ├── function-bind │ │ ├── index.js │ │ ├── .github │ │ │ ├── SECURITY.md │ │ │ └── FUNDING.yml │ │ ├── test │ │ │ └── .eslintrc │ │ ├── .nycrc │ │ └── .eslintrc │ ├── util-deprecate │ │ ├── node.js │ │ ├── History.md │ │ └── package.json │ ├── picocolors │ │ ├── picocolors.d.ts │ │ ├── picocolors.browser.js │ │ ├── package.json │ │ ├── README.md │ │ └── LICENSE │ ├── update-browserslist-db │ │ ├── index.d.ts │ │ ├── check-npm-version.js │ │ ├── README.md │ │ └── utils.js │ ├── strip-ansi-cjs │ │ ├── index.js │ │ ├── node_modules │ │ │ └── ansi-regex │ │ │ │ └── index.js │ │ └── index.d.ts │ ├── browserslist │ │ ├── error.d.ts │ │ └── error.js │ ├── is-core-module │ │ ├── .nycrc │ │ └── .eslintrc │ ├── caniuse-lite │ │ └── README.md │ ├── wrap-ansi-cjs │ │ └── node_modules │ │ │ ├── strip-ansi │ │ │ ├── index.js │ │ │ └── index.d.ts │ │ │ ├── ansi-regex │ │ │ └── index.js │ │ │ └── emoji-regex │ │ │ └── index.d.ts │ ├── string-width-cjs │ │ └── node_modules │ │ │ ├── strip-ansi │ │ │ ├── index.js │ │ │ └── index.d.ts │ │ │ ├── ansi-regex │ │ │ └── index.js │ │ │ └── emoji-regex │ │ │ └── index.d.ts │ ├── fastq │ │ ├── test │ │ │ └── tsconfig.json │ │ ├── .github │ │ │ └── dependabot.yml │ │ ├── example.mjs │ │ ├── example.js │ │ └── LICENSE │ ├── postcss-js │ │ ├── index.mjs │ │ ├── index.js │ │ ├── process-result.js │ │ ├── sync.js │ │ ├── async.js │ │ └── README.md │ ├── dlv │ │ └── index.js │ ├── escalade │ │ ├── sync │ │ │ ├── index.d.mts │ │ │ ├── index.d.ts │ │ │ ├── index.mjs │ │ │ └── index.js │ │ ├── index.d.mts │ │ └── index.d.ts │ ├── thenify-all │ │ └── History.md │ ├── is-binary-path │ │ ├── index.js │ │ ├── index.d.ts │ │ └── package.json │ ├── @pkgjs │ │ └── parseargs │ │ │ ├── internal │ │ │ └── util.js │ │ │ ├── .editorconfig │ │ │ └── examples │ │ │ └── simple-hard-coded.js │ ├── postcss-load-config │ │ └── src │ │ │ └── req.js │ ├── thenify │ │ └── History.md │ ├── @isaacs │ │ └── cliui │ │ │ ├── index.mjs │ │ │ └── LICENSE.txt │ ├── strip-ansi │ │ ├── index.d.ts │ │ └── index.js │ ├── color-name │ │ ├── README.md │ │ └── package.json │ ├── source-map-js │ │ └── source-map.js │ ├── eastasianwidth │ │ └── package.json │ ├── shebang-command │ │ ├── index.js │ │ ├── readme.md │ │ └── package.json │ ├── path-key │ │ ├── index.js │ │ └── package.json │ ├── is-number │ │ └── index.js │ ├── ansi-regex │ │ ├── index.js │ │ └── index.d.ts │ ├── is-extglob │ │ └── index.js │ ├── node-releases │ │ ├── package.json │ │ └── README.md │ ├── is-fullwidth-code-point │ │ └── index.d.ts │ ├── didyoumean │ │ ├── LICENSE │ │ └── package.json │ ├── autoprefixer │ │ └── bin │ │ │ └── autoprefixer │ ├── camelcase-css │ │ ├── index.js │ │ └── index-es5.js │ ├── lines-and-columns │ │ └── README.md │ ├── arg │ │ └── package.json │ ├── electron-to-chromium │ │ ├── LICENSE │ │ └── chromium-versions.json │ ├── path-parse │ │ └── package.json │ ├── which │ │ └── LICENSE │ ├── glob │ │ └── LICENSE │ ├── chokidar │ │ └── node_modules │ │ │ └── glob-parent │ │ │ └── LICENSE │ ├── lru-cache │ │ └── LICENSE │ ├── minimatch │ │ └── LICENSE │ ├── anymatch │ │ ├── LICENSE │ │ └── index.d.ts │ ├── foreground-child │ │ └── LICENSE │ ├── minipass │ │ └── LICENSE │ ├── postcss-nested │ │ └── package.json │ └── signal-exit │ │ └── LICENSE.txt ├── assets │ └── handbook.png ├── chapters │ └── en │ │ ├── chapter0 │ │ └── introduction.mdx │ │ └── _toctree.yml ├── chat-frontend │ ├── public │ │ ├── robots.txt │ │ ├── favicon.ico │ │ ├── logo192.png │ │ ├── logo512.png │ │ └── manifest.json │ ├── postcss.config.js │ ├── tailwind.config.js │ ├── src │ │ ├── setupTests.js │ │ ├── App.test.js │ │ ├── index.js │ │ ├── reportWebVitals.js │ │ ├── index.css │ │ └── App.css │ └── .gitignore ├── package.json ├── recipes │ └── accelerate_configs │ │ ├── multi_gpu.yaml │ │ └── deepspeed_zero3.yaml ├── src │ └── alignment │ │ └── __init__.py ├── .github │ └── workflows │ │ ├── upload_pr_documentation.yml │ │ ├── build_documentation.yml │ │ ├── build_pr_documentation.yml │ │ ├── quality.yml │ │ └── tests.yml └── setup.cfg └── .gitignore /trl/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /trl/tests/slow/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /alignment-handbook/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/mug.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/baz/doom.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/mug.coffee: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/stubs/.npmignore: -------------------------------------------------------------------------------- 1 | !* 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/types/generated/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/q.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/pathfilter/deep_ref/main.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/browser_field/a.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/browser_field/b.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/cup.coffee: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/false_main/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/other_path/root.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/base.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/lie.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/pinkie.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/rsvp.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/vow.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/when.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/screens.css: -------------------------------------------------------------------------------- 1 | @tailwind screens; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/bluebird.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/es6-promise.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/promise.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/isexe/.npmignore: -------------------------------------------------------------------------------- 1 | .nyc_output/ 2 | coverage/ 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/utilities.css: -------------------------------------------------------------------------------- 1 | @tailwind utilities; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/variants.css: -------------------------------------------------------------------------------- 1 | @tailwind variants; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/foo.js: -------------------------------------------------------------------------------- 1 | module.exports = 1; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/shadowed_core/node_modules/util/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/components.css: -------------------------------------------------------------------------------- 1 | @tailwind components; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/native-promise-only.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/dotdot/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 'whatever'; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/precedence/aaa.js: -------------------------------------------------------------------------------- 1 | module.exports = 'wtf'; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/precedence/bbb.js: -------------------------------------------------------------------------------- 1 | module.exports = '>_<'; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/baz/quux.js: -------------------------------------------------------------------------------- 1 | module.exports = 1; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/yaml/browser/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module" 3 | } 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/node_path/x/aaa/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 'A'; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/node_path/x/ccc/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 'C'; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/node_path/y/bbb/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 'B'; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/node_path/y/ccc/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 'CY'; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/precedence/aaa/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 'okok'; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/dot_main/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 1; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/quux/foo/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 1; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/same_names/foo.js: -------------------------------------------------------------------------------- 1 | module.exports = 42; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./plugin') 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | alignment-handbook/*.ipynb 2 | alignment-handbook/results 3 | alignment-handbook/alpaca_eval -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/precedence/aaa/main.js: -------------------------------------------------------------------------------- 1 | console.log(require('./')); 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/dot_slash_main/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 1; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/same_names/foo/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 1; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/sucrase/register/js.js: -------------------------------------------------------------------------------- 1 | require("../dist/register").registerJS(); 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/sucrase/register/jsx.js: -------------------------------------------------------------------------------- 1 | require("../dist/register").registerJSX(); 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/sucrase/register/ts.js: -------------------------------------------------------------------------------- 1 | require("../dist/register").registerTS(); 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/sucrase/register/tsx.js: -------------------------------------------------------------------------------- 1 | require("../dist/register").registerTSX(); 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node":true, 3 | "strict":true 4 | } 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./register')().Promise 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/jiti/register.js: -------------------------------------------------------------------------------- 1 | const jiti = require(".")(); 2 | 3 | jiti.register(); 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/dot_main/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "." 3 | } 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/symlinked/package/bar.js: -------------------------------------------------------------------------------- 1 | module.exports = 'bar'; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/reusify/.coveralls.yml: -------------------------------------------------------------------------------- 1 | repo_token: yIxhFqtaaz5iGVYfie9mODehFYogm8S8L 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/shebang-regex/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = /^#!(.*)/; 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/sucrase/register/index.js: -------------------------------------------------------------------------------- 1 | require("../dist/register").registerAll(); 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/.bin/sucrase: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | require("../dist/cli").default(); 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/hasown/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | 4 | "extends": "@ljharb", 5 | } 6 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/dotdot/abc/index.js: -------------------------------------------------------------------------------- 1 | var x = require('..'); 2 | console.log(x); 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/binary-extensions/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./binary-extensions.json'); 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/async.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./lib/async'); 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/sync.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./lib/sync'); 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/module_dir/zmodules/bbb/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "main.js" 3 | } 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/precedence/bbb/main.js: -------------------------------------------------------------------------------- 1 | console.log(require('./')); // should throw 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/dot_slash_main/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "./" 3 | } 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/symlinked/package/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "bar.js" 3 | } -------------------------------------------------------------------------------- /alignment-handbook/node_modules/sucrase/bin/sucrase: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | require("../dist/cli").default(); 4 | -------------------------------------------------------------------------------- /trl/trl/environment/__init__.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | 3 | from .base_environment import TextEnvironment, TextHistory 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts: -------------------------------------------------------------------------------- 1 | import * as fs from './fs'; 2 | export { fs }; 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/implementation.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./register')().implementation 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/picomatch/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./lib/picomatch'); 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/incorrect_main/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "wrong.js" 3 | } 4 | -------------------------------------------------------------------------------- /alignment-handbook/assets/handbook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingdy2002/SPA/HEAD/alignment-handbook/assets/handbook.png -------------------------------------------------------------------------------- /alignment-handbook/chapters/en/chapter0/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Welcome to the RLHF Handbook! 2 | 3 | Stay tuned for more details 🤗 -------------------------------------------------------------------------------- /alignment-handbook/node_modules/balanced-match/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | tidelift: "npm/balanced-match" 2 | patreon: juliangruber 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/supports-preserve-symlinks-flag/browser.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = null; 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | module.exports = require('./cli/index') 4 | -------------------------------------------------------------------------------- /trl/requirements.txt: -------------------------------------------------------------------------------- 1 | datasets>=1.17.0 2 | torch>=1.4.0 3 | tqdm 4 | transformers 5 | accelerate 6 | peft>=0.3.0 7 | tyro>=0.5.7 -------------------------------------------------------------------------------- /alignment-handbook/chat-frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/brace-expansion/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | tidelift: "npm/brace-expansion" 2 | patreon: juliangruber 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/module_dir/xmodules/aaa/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function (x) { return x * 100; }; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/module_dir/ymodules/aaa/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function (x) { return x + 100; }; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/module_dir/zmodules/bbb/main.js: -------------------------------------------------------------------------------- 1 | module.exports = function (n) { return n * 111; }; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/baz/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "baz", 3 | "main": "quux.js" 4 | } 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/yaml/util.js: -------------------------------------------------------------------------------- 1 | // Re-exporter for Node.js < 12.16.0 2 | module.exports = require('./dist/util.js') 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/implementation.d.ts: -------------------------------------------------------------------------------- 1 | declare var implementation: string; 2 | 3 | export = implementation; 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/lie.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('lie', {Promise: require('lie')}) 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/false_main/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "false_main", 3 | "main": false 4 | } 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/tailwind.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | 3 | @tailwind components; 4 | 5 | @tailwind utilities; 6 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/.npmignore: -------------------------------------------------------------------------------- 1 | .git* 2 | test/ 3 | test-browser/ 4 | build/ 5 | .travis.yml 6 | *.swp 7 | Makefile 8 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/q.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('q', {Promise: require('q').Promise}) 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/sucrase/register/ts-legacy-module-interop.js: -------------------------------------------------------------------------------- 1 | require("../dist/register").registerTSLegacyModuleInterop(); 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/sucrase/register/tsx-legacy-module-interop.js: -------------------------------------------------------------------------------- 1 | require("../dist/register").registerTSXLegacyModuleInterop(); 2 | -------------------------------------------------------------------------------- /trl/examples/README.md: -------------------------------------------------------------------------------- 1 | # Examples 2 | 3 | Please check out https://huggingface.co/docs/trl/example_overview for documentation on our examples. -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/pinkie.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('pinkie', {Promise: require('pinkie')}) 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/vow.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('vow', {Promise: require('vow').Promise}) 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/types/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/queue-microtask/index.d.ts: -------------------------------------------------------------------------------- 1 | declare const queueMicrotask: (cb: () => void) => void 2 | export = queueMicrotask 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/tap.js: -------------------------------------------------------------------------------- 1 | export function tap(value, mutator) { 2 | mutator(value) 3 | return value 4 | } 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/stubs/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default __CONFIG__ 3 | -------------------------------------------------------------------------------- /trl/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include settings.ini 2 | include LICENSE 3 | include CONTRIBUTING.md 4 | include README.md 5 | recursive-exclude * __pycache__ 6 | -------------------------------------------------------------------------------- /alignment-handbook/chat-frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingdy2002/SPA/HEAD/alignment-handbook/chat-frontend/public/favicon.ico -------------------------------------------------------------------------------- /alignment-handbook/chat-frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingdy2002/SPA/HEAD/alignment-handbook/chat-frontend/public/logo192.png -------------------------------------------------------------------------------- /alignment-handbook/chat-frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingdy2002/SPA/HEAD/alignment-handbook/chat-frontend/public/logo512.png -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.stat/out/types/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.walk/out/types/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/bluebird.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('bluebird', {Promise: require('bluebird')}) 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/promise.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('promise', {Promise: require('promise')}) 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/rsvp.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('rsvp', {Promise: require('rsvp').Promise}) 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/when.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('when', {Promise: require('when').Promise}) 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/hasown/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@ljharb/tsconfig", 3 | "exclude": [ 4 | "coverage", 5 | ], 6 | } 7 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/public/load-config.js: -------------------------------------------------------------------------------- 1 | import { loadConfig } from '../lib/load-config' 2 | export default loadConfig 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/stubs/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = __CONFIG__ 3 | -------------------------------------------------------------------------------- /alignment-handbook/chat-frontend/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.scandir/out/types/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/public/create-plugin.js: -------------------------------------------------------------------------------- 1 | import createPlugin from '../util/createPlugin' 2 | export default createPlugin 3 | -------------------------------------------------------------------------------- /trl/examples/research_projects/stack_llama_2/scripts/requirements.txt: -------------------------------------------------------------------------------- 1 | transformers 2 | trl 3 | peft 4 | accelerate 5 | datasets 6 | bitsandbytes 7 | wandb 8 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/browser_field/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "browser_field", 3 | "main": "a", 4 | "browser": "b" 5 | } 6 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/multirepo/lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "packages/*" 4 | ], 5 | "version": "0.0.0" 6 | } 7 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/emoji-regex/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'emoji-regex' { 2 | function emojiRegex(): RegExp; 3 | 4 | export = emojiRegex; 5 | } 6 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/emoji-regex/text.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'emoji-regex/text' { 2 | function emojiRegex(): RegExp; 3 | 4 | export = emojiRegex; 5 | } 6 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/defaultConfig.d.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from './types/config' 2 | declare const config: Config 3 | export = config 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/stubs/tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from 'tailwindcss' 2 | 3 | export default __CONFIG__ satisfies Config 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts: -------------------------------------------------------------------------------- 1 | export declare function joinPathSegments(a: string, b: string, separator: string): string; 2 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/es6-promise.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('es6-promise', {Promise: require('es6-promise').Promise}) 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/example/sync.js: -------------------------------------------------------------------------------- 1 | var resolve = require('../'); 2 | var res = resolve.sync('tap', { basedir: __dirname }); 3 | console.log(res); 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/bigSign.js: -------------------------------------------------------------------------------- 1 | export default function bigSign(bigIntValue) { 2 | return (bigIntValue > 0n) - (bigIntValue < 0n) 3 | } 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/stubs/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /alignment-handbook/chapters/en/_toctree.yml: -------------------------------------------------------------------------------- 1 | - title: Unit 0. Welcome to the RLHF Handbook! 2 | sections: 3 | - local: chapter0/introduction 4 | title: What is this about? -------------------------------------------------------------------------------- /alignment-handbook/node_modules/binary-extensions/binary-extensions.json.d.ts: -------------------------------------------------------------------------------- 1 | declare const binaryExtensionsJson: readonly string[]; 2 | 3 | export = binaryExtensionsJson; 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/emoji-regex/RGI_Emoji.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'emoji-regex/RGI_Emoji' { 2 | function emojiRegex(): RegExp; 3 | 4 | export = emojiRegex; 5 | } 6 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/emoji-regex/es2015/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'emoji-regex/es2015' { 2 | function emojiRegex(): RegExp; 3 | 4 | export = emojiRegex; 5 | } 6 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/hasown/index.d.ts: -------------------------------------------------------------------------------- 1 | declare function hasOwn(o: O, p: K): o is O & Record; 2 | 3 | export = hasOwn; 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/escapeCommas.js: -------------------------------------------------------------------------------- 1 | export default function escapeCommas(className) { 2 | return className.replace(/\\,/g, '\\2c ') 3 | } 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/stubs/config.simple.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | content: [], 3 | theme: { 4 | extend: {}, 5 | }, 6 | plugins: [], 7 | } 8 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/stubs/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /alignment-handbook/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "autoprefixer": "^10.4.20", 4 | "postcss": "^8.4.47", 5 | "tailwindcss": "^3.4.14" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/emoji-regex/es2015/text.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'emoji-regex/es2015/text' { 2 | function emojiRegex(): RegExp; 3 | 4 | export = emojiRegex; 5 | } 6 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/nanoid/non-secure/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "main": "index.cjs", 4 | "module": "index.js", 5 | "react-native": "index.js" 6 | } -------------------------------------------------------------------------------- /alignment-handbook/node_modules/nanoid/url-alphabet/index.js: -------------------------------------------------------------------------------- 1 | let urlAlphabet = 2 | 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' 3 | export { urlAlphabet } 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/nanoid/url-alphabet/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "main": "index.cjs", 4 | "module": "index.js", 5 | "react-native": "index.js" 6 | } -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/colors.d.ts: -------------------------------------------------------------------------------- 1 | import type { DefaultColors } from './types/generated/colors' 2 | declare const colors: DefaultColors 3 | export = colors 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/colors.js: -------------------------------------------------------------------------------- 1 | let colors = require('./lib/public/colors') 2 | module.exports = (colors.__esModule ? colors : { default: colors }).default 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/stubs/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "semi": false, 4 | "singleQuote": true, 5 | "trailingComma": "es5" 6 | } 7 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register/native-promise-only.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('native-promise-only', {Promise: require('native-promise-only')}) 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/utils/errno.d.ts: -------------------------------------------------------------------------------- 1 | import { ErrnoException } from '../types'; 2 | export declare function isEnoentCodeError(error: ErrnoException): boolean; 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/emoji-regex/es2015/RGI_Emoji.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'emoji-regex/es2015/RGI_Emoji' { 2 | function emojiRegex(): RegExp; 3 | 4 | export = emojiRegex; 5 | } 6 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/nanoid/url-alphabet/index.cjs: -------------------------------------------------------------------------------- 1 | let urlAlphabet = 2 | 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' 3 | module.exports = { urlAlphabet } 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/loadConfig.d.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from './types/config' 2 | 3 | declare function loadConfig(path: string): Config 4 | export = loadConfig 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/optional.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | try { 3 | module.exports = require('./register')().Promise || null 4 | } catch(e) { 5 | module.exports = null 6 | } 7 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/utils/string.d.ts: -------------------------------------------------------------------------------- 1 | export declare function isString(input: unknown): input is string; 2 | export declare function isEmpty(input: string): boolean; 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/mz/child_process.js: -------------------------------------------------------------------------------- 1 | 2 | require('thenify-all').withCallback( 3 | require('child_process'), 4 | exports, [ 5 | 'exec', 6 | 'execFile', 7 | ] 8 | ) 9 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/function-bind/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var implementation = require('./implementation'); 4 | 5 | module.exports = Function.prototype.bind || implementation; 6 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/incorrect_main/index.js: -------------------------------------------------------------------------------- 1 | // this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate 2 | module.exports = 1; 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/invalid_main/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "invalid_main", 3 | "main": [ 4 | "why is this a thing", 5 | "srsly omg wtf" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/nesting/index.js: -------------------------------------------------------------------------------- 1 | let nesting = require('../lib/postcss-plugins/nesting') 2 | module.exports = (nesting.__esModule ? nesting : { default: nesting }).default 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/util-deprecate/node.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * For Node.js, simply re-export the core `util.deprecate` function. 4 | */ 5 | 6 | module.exports = require('util').deprecate; 7 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.scandir/out/constants.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * IS `true` for Node.js 10.10 and greater. 3 | */ 4 | export declare const IS_SUPPORT_READDIR_WITH_FILE_TYPES: boolean; 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts: -------------------------------------------------------------------------------- 1 | import type { Dirent, Stats } from '../types'; 2 | export declare function createDirentFromStats(name: string, stats: Stats): Dirent; 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/without_basedir/main.js: -------------------------------------------------------------------------------- 1 | var resolve = require('../../../'); 2 | 3 | module.exports = function (t, cb) { 4 | resolve('mymodule', null, cb); 5 | }; 6 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/loadConfig.js: -------------------------------------------------------------------------------- 1 | let loadConfig = require('./lib/public/load-config') 2 | module.exports = (loadConfig.__esModule ? loadConfig : { default: loadConfig }).default 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/plugin.js: -------------------------------------------------------------------------------- 1 | let createPlugin = require('./lib/public/create-plugin') 2 | module.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/hashConfig.js: -------------------------------------------------------------------------------- 1 | import hash from 'object-hash' 2 | 3 | export default function hashConfig(config) { 4 | return hash(config, { ignoreUnknown: true }) 5 | } 6 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/utils/array.d.ts: -------------------------------------------------------------------------------- 1 | export declare function flatten(items: T[][]): T[]; 2 | export declare function splitWhen(items: T[], predicate: (item: T) => boolean): T[][]; 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/nanoid/nanoid.js: -------------------------------------------------------------------------------- 1 | export let nanoid=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce(((t,e)=>t+=(e&=63)<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e<63?"_":"-"),""); -------------------------------------------------------------------------------- /alignment-handbook/node_modules/picocolors/picocolors.d.ts: -------------------------------------------------------------------------------- 1 | import { Colors } from "./types" 2 | 3 | declare const picocolors: Colors & { createColors: (enabled?: boolean) => Colors } 4 | 5 | export = picocolors 6 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/defaultTheme.js: -------------------------------------------------------------------------------- 1 | let defaultTheme = require('./lib/public/default-theme') 2 | module.exports = (defaultTheme.__esModule ? defaultTheme : { default: defaultTheme }).default 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/toColorValue.js: -------------------------------------------------------------------------------- 1 | export default function toColorValue(maybeFunction) { 2 | return typeof maybeFunction === 'function' ? maybeFunction({}) : maybeFunction 3 | } 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/providers/matchers/partial.d.ts: -------------------------------------------------------------------------------- 1 | import Matcher from './matcher'; 2 | export default class PartialMatcher extends Matcher { 3 | match(filepath: string): boolean; 4 | } 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security 2 | 3 | Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/update-browserslist-db/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Run update and print output to terminal. 3 | */ 4 | declare function updateDb(print?: (str: string) => void): void 5 | 6 | export = updateDb 7 | -------------------------------------------------------------------------------- /trl/tests/test_e2e.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | 3 | 4 | def test_hello_world(): 5 | subprocess.run( 6 | "python examples/hello_world.py", 7 | shell=True, 8 | check=True, 9 | ) 10 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/mz/crypto.js: -------------------------------------------------------------------------------- 1 | 2 | require('thenify-all').withCallback( 3 | require('crypto'), 4 | exports, [ 5 | 'pbkdf2', 6 | 'pseudoRandomBytes', 7 | 'randomBytes' 8 | ] 9 | ) 10 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/strip-ansi-cjs/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const ansiRegex = require('ansi-regex'); 3 | 4 | module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/defaultConfig.js: -------------------------------------------------------------------------------- 1 | let defaultConfig = require('./lib/public/default-config') 2 | module.exports = (defaultConfig.__esModule ? defaultConfig : { default: defaultConfig }).default 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/nesting/index.d.ts: -------------------------------------------------------------------------------- 1 | import type { AcceptedPlugin, PluginCreator } from 'postcss' 2 | 3 | declare const plugin: PluginCreator 4 | export = plugin 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/resolveConfig.js: -------------------------------------------------------------------------------- 1 | let resolveConfig = require('./lib/public/resolve-config') 2 | module.exports = (resolveConfig.__esModule ? resolveConfig : { default: resolveConfig }).default 3 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/public/default-config.js: -------------------------------------------------------------------------------- 1 | import { cloneDeep } from '../util/cloneDeep' 2 | import defaultConfig from '../../stubs/config.full' 3 | 4 | export default cloneDeep(defaultConfig) 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/isKeyframeRule.js: -------------------------------------------------------------------------------- 1 | export default function isKeyframeRule(rule) { 2 | return rule.parent && rule.parent.type === 'atrule' && /keyframes$/.test(rule.parent.name) 3 | } 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.scandir/out/utils/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.fs = void 0; 4 | const fs = require("./fs"); 5 | exports.fs = fs; 6 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/example/async.js: -------------------------------------------------------------------------------- 1 | var resolve = require('../'); 2 | resolve('tap', { basedir: __dirname }, function (err, res) { 3 | if (err) console.error(err); 4 | else console.log(res); 5 | }); 6 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts: -------------------------------------------------------------------------------- 1 | import type Settings from '../settings'; 2 | import type { Stats } from '../types'; 3 | export declare function read(path: string, settings: Settings): Stats; 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/browserslist/error.d.ts: -------------------------------------------------------------------------------- 1 | declare class BrowserslistError extends Error { 2 | constructor(message: any) 3 | name: 'BrowserslistError' 4 | browserslist: true 5 | } 6 | 7 | export = BrowserslistError 8 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/function-bind/.github/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security 2 | 3 | Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/is-core-module/.nycrc: -------------------------------------------------------------------------------- 1 | { 2 | "all": true, 3 | "check-coverage": false, 4 | "reporter": ["text-summary", "text", "html", "json"], 5 | "exclude": [ 6 | "coverage", 7 | "test" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/caniuse-lite/README.md: -------------------------------------------------------------------------------- 1 | # caniuse-lite 2 | 3 | A smaller version of caniuse-db, with only the essentials! 4 | 5 | ## Docs 6 | Read full docs **[here](https://github.com/browserslist/caniuse-lite#readme)**. 7 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/public/default-theme.js: -------------------------------------------------------------------------------- 1 | import { cloneDeep } from '../util/cloneDeep' 2 | import defaultFullConfig from '../../stubs/config.full' 3 | 4 | export default cloneDeep(defaultFullConfig.theme) 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.stat/out/types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import type * as fs from 'fs'; 3 | export declare type Stats = fs.Stats; 4 | export declare type ErrnoException = NodeJS.ErrnoException; 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/index.js: -------------------------------------------------------------------------------- 1 | var async = require('./lib/async'); 2 | async.core = require('./lib/core'); 3 | async.isCore = require('./lib/is-core'); 4 | async.sync = require('./lib/sync'); 5 | 6 | module.exports = async; 7 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const ansiRegex = require('ansi-regex'); 3 | 4 | module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/utils/stream.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | import { Readable } from 'stream'; 4 | export declare function merge(streams: Readable[]): NodeJS.ReadableStream; 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/string-width-cjs/node_modules/strip-ansi/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const ansiRegex = require('ansi-regex'); 3 | 4 | module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/defaultTheme.d.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from './types/config' 2 | import { DefaultTheme } from './types/generated/default-theme' 3 | declare const theme: Config['theme'] & DefaultTheme 4 | export = theme 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.walk/out/providers/index.d.ts: -------------------------------------------------------------------------------- 1 | import AsyncProvider from './async'; 2 | import StreamProvider from './stream'; 3 | import SyncProvider from './sync'; 4 | export { AsyncProvider, StreamProvider, SyncProvider }; 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/supports-preserve-symlinks-flag/.nycrc: -------------------------------------------------------------------------------- 1 | { 2 | "all": true, 3 | "check-coverage": false, 4 | "reporter": ["text-summary", "text", "html", "json"], 5 | "exclude": [ 6 | "coverage", 7 | "test" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /alignment-handbook/chat-frontend/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [ 4 | "./src/**/*.{js,jsx,ts,tsx}", 5 | ], 6 | theme: { 7 | extend: {}, 8 | }, 9 | plugins: [], 10 | } -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/utils/fs.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import * as fs from 'fs'; 3 | import { Dirent } from '@nodelib/fs.walk'; 4 | export declare function createDirentFromStats(name: string, stats: fs.Stats): Dirent; 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fastq/test/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs", 5 | "noEmit": true, 6 | "strict": true 7 | }, 8 | "files": [ 9 | "./example.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/yaml/browser/index.js: -------------------------------------------------------------------------------- 1 | // `export * as default from ...` fails on Webpack v4 2 | // https://github.com/eemeli/yaml/issues/228 3 | import * as YAML from './dist/index.js' 4 | export default YAML 5 | export * from './dist/index.js' 6 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/postcss-js/index.mjs: -------------------------------------------------------------------------------- 1 | import index from './index.js' 2 | 3 | export default index 4 | 5 | export const objectify = index.objectify 6 | export const parse = index.parse 7 | export const async = index.async 8 | export const sync = index.sync 9 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/supports-preserve-symlinks-flag/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | 4 | "extends": "@ljharb", 5 | 6 | "env": { 7 | "browser": true, 8 | "node": true, 9 | }, 10 | 11 | "rules": { 12 | "id-length": "off", 13 | }, 14 | } 15 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/dlv/index.js: -------------------------------------------------------------------------------- 1 | export default function dlv(obj, key, def, p, undef) { 2 | key = key.split ? key.split('.') : key; 3 | for (p = 0; p < key.length; p++) { 4 | obj = obj ? obj[key[p]] : undef; 5 | } 6 | return obj === undef ? def : obj; 7 | } 8 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/escalade/sync/index.d.mts: -------------------------------------------------------------------------------- 1 | export type Callback = ( 2 | directory: string, 3 | files: string[], 4 | ) => string | false | void; 5 | 6 | export default function ( 7 | directory: string, 8 | callback: Callback, 9 | ): string | void; 10 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/function-bind/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "array-bracket-newline": 0, 4 | "array-element-newline": 0, 5 | "max-statements-per-line": [2, { "max": 2 }], 6 | "no-invalid-this": 0, 7 | "no-magic-numbers": 0, 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/mz/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | fs: require('./fs'), 3 | dns: require('./dns'), 4 | zlib: require('./zlib'), 5 | crypto: require('./crypto'), 6 | readline: require('./readline'), 7 | child_process: require('./child_process') 8 | } 9 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/value-parser/README.md: -------------------------------------------------------------------------------- 1 | # postcss-value-parser (forked + inlined) 2 | 3 | This is a customized version of of [PostCSS Value Parser](https://github.com/TrySound/postcss-value-parser) to fix some bugs around parsing CSS functions. 4 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/hasown/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var call = Function.prototype.call; 4 | var $hasOwn = Object.prototype.hasOwnProperty; 5 | var bind = require('function-bind'); 6 | 7 | /** @type {import('.')} */ 8 | module.exports = bind.call(call, $hasOwn); 9 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/nonstring.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var resolve = require('../'); 3 | 4 | test('nonstring', function (t) { 5 | t.plan(1); 6 | resolve(555, function (err, res, pkg) { 7 | t.ok(err); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /trl/setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | license_file = LICENSE 3 | 4 | [isort] 5 | ensure_newline_before_comments = True 6 | force_grid_wrap = 0 7 | include_trailing_comma = True 8 | line_length = 119 9 | lines_after_imports = 2 10 | multi_line_output = 3 11 | use_parentheses = True 12 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/mz/zlib.js: -------------------------------------------------------------------------------- 1 | 2 | require('thenify-all').withCallback( 3 | require('zlib'), 4 | exports, [ 5 | 'deflate', 6 | 'deflateRaw', 7 | 'gzip', 8 | 'gunzip', 9 | 'inflate', 10 | 'inflateRaw', 11 | 'unzip', 12 | ] 13 | ) 14 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/thenify-all/History.md: -------------------------------------------------------------------------------- 1 | 2 | 1.6.0 / 2015-01-11 3 | ================== 4 | 5 | * feat: exports thenify 6 | * support node 0.8+ 7 | 8 | 1.5.0 / 2015-01-09 9 | ================== 10 | 11 | * feat: support backward compatible with callback 12 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/postcss-js/index.js: -------------------------------------------------------------------------------- 1 | let objectify = require('./objectifier') 2 | let parse = require('./parser') 3 | let async = require('./async') 4 | let sync = require('./sync') 5 | 6 | module.exports = { 7 | objectify, 8 | parse, 9 | async, 10 | sync 11 | } 12 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/reusify/benchmarks/fib.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | function fib (num) { 4 | var fib = [] 5 | 6 | fib[0] = 0 7 | fib[1] = 1 8 | for (var i = 2; i <= num; i++) { 9 | fib[i] = fib[i - 2] + fib[i - 1] 10 | } 11 | } 12 | 13 | module.exports = fib 14 | -------------------------------------------------------------------------------- /trl/benchmark/post_github_comment.sbatch: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #SBATCH --job-name=trl 3 | #SBATCH --partition=production-cluster 4 | #SBATCH --ntasks=1 5 | #SBATCH --output=slurm/logs/%x_%j.out 6 | 7 | sleep 2m 8 | bash $BENCHMARK_PLOT_SCRIPT 9 | srun python benchmark/post_github_comment.py 10 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts: -------------------------------------------------------------------------------- 1 | import type Settings from '../settings'; 2 | export default class Reader { 3 | protected readonly _root: string; 4 | protected readonly _settings: Settings; 5 | constructor(_root: string, _settings: Settings); 6 | } 7 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fastq/.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | open-pull-requests-limit: 10 8 | ignore: 9 | - dependency-name: standard 10 | versions: 11 | - 16.0.3 12 | -------------------------------------------------------------------------------- /alignment-handbook/chat-frontend/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /trl/examples/research_projects/toxicity/README.md: -------------------------------------------------------------------------------- 1 | # De-detoxifying language models 2 | 3 | To run this code, do the following: 4 | 5 | ```shell 6 | ACCELERATE_LOG_LEVEL=info accelerate launch --config_file {CONFIG} examples/research_projects/toxicity/scripts/gpt-j-6b-toxicity.py --log_with wandb 7 | ``` 8 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/utils/errno.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.isEnoentCodeError = void 0; 4 | function isEnoentCodeError(error) { 5 | return error.code === 'ENOENT'; 6 | } 7 | exports.isEnoentCodeError = isEnoentCodeError; 8 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/is-binary-path/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const path = require('path'); 3 | const binaryExtensions = require('binary-extensions'); 4 | 5 | const extensions = new Set(binaryExtensions); 6 | 7 | module.exports = filePath => extensions.has(path.extname(filePath).slice(1).toLowerCase()); 8 | -------------------------------------------------------------------------------- /alignment-handbook/chat-frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fastq/example.mjs: -------------------------------------------------------------------------------- 1 | import { promise as queueAsPromised } from './queue.js' 2 | 3 | /* eslint-disable */ 4 | 5 | const queue = queueAsPromised(worker, 1) 6 | 7 | console.log('the result is', await queue.push(42)) 8 | 9 | async function worker (arg) { 10 | return 42 * 2 11 | } 12 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/hasown/.nycrc: -------------------------------------------------------------------------------- 1 | { 2 | "all": true, 3 | "check-coverage": false, 4 | "reporter": ["text-summary", "text", "html", "json"], 5 | "lines": 86, 6 | "statements": 85.93, 7 | "functions": 82.43, 8 | "branches": 76.06, 9 | "exclude": [ 10 | "coverage", 11 | "test" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/function-bind/.nycrc: -------------------------------------------------------------------------------- 1 | { 2 | "all": true, 3 | "check-coverage": false, 4 | "reporter": ["text-summary", "text", "html", "json"], 5 | "lines": 86, 6 | "statements": 85.93, 7 | "functions": 82.43, 8 | "branches": 76.06, 9 | "exclude": [ 10 | "coverage", 11 | "test" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/escalade/index.d.mts: -------------------------------------------------------------------------------- 1 | type Promisable = T | Promise; 2 | 3 | export type Callback = ( 4 | directory: string, 5 | files: string[], 6 | ) => Promisable; 7 | 8 | export default function ( 9 | directory: string, 10 | callback: Callback, 11 | ): Promise; 12 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/nanoid/async/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "main": "index.cjs", 4 | "module": "index.js", 5 | "react-native": { 6 | "./index.js": "./index.native.js" 7 | }, 8 | "browser": { 9 | "./index.js": "./index.browser.js", 10 | "./index.cjs": "./index.browser.cjs" 11 | } 12 | } -------------------------------------------------------------------------------- /alignment-handbook/chat-frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | const root = ReactDOM.createRoot(document.getElementById('root')); 7 | root.render( 8 | 9 | 10 | 11 | ); -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.walk/out/types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import type * as scandir from '@nodelib/fs.scandir'; 3 | export declare type Entry = scandir.Entry; 4 | export declare type Errno = NodeJS.ErrnoException; 5 | export interface QueueItem { 6 | directory: string; 7 | base?: string; 8 | } 9 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fastq/example.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /* eslint-disable no-var */ 4 | 5 | var queue = require('./')(worker, 1) 6 | 7 | queue.push(42, function (err, result) { 8 | if (err) { throw err } 9 | console.log('the result is', result) 10 | }) 11 | 12 | function worker (arg, cb) { 13 | cb(null, 42 * 2) 14 | } 15 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/escapeClassName.js: -------------------------------------------------------------------------------- 1 | import parser from 'postcss-selector-parser' 2 | import escapeCommas from './escapeCommas' 3 | 4 | export default function escapeClassName(className) { 5 | let node = parser.className() 6 | node.value = className 7 | return escapeCommas(node?.raws?.value ?? node.value) 8 | } 9 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.stat/out/providers/async.d.ts: -------------------------------------------------------------------------------- 1 | import type Settings from '../settings'; 2 | import type { ErrnoException, Stats } from '../types'; 3 | export declare type AsyncCallback = (error: ErrnoException, stats: Stats) => void; 4 | export declare function read(path: string, settings: Settings, callback: AsyncCallback): void; 5 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/mz/dns.js: -------------------------------------------------------------------------------- 1 | 2 | require('thenify-all').withCallback( 3 | require('dns'), 4 | exports, [ 5 | 'lookup', 6 | 'resolve', 7 | 'resolve4', 8 | 'resolve6', 9 | 'resolveCname', 10 | 'resolveMx', 11 | 'resolveNs', 12 | 'resolveSrv', 13 | 'resolveTxt', 14 | 'reverse' 15 | ] 16 | ) 17 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/isPlainObject.js: -------------------------------------------------------------------------------- 1 | export default function isPlainObject(value) { 2 | if (Object.prototype.toString.call(value) !== '[object Object]') { 3 | return false 4 | } 5 | 6 | const prototype = Object.getPrototypeOf(value) 7 | return prototype === null || Object.getPrototypeOf(prototype) === null 8 | } 9 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/responsive.js: -------------------------------------------------------------------------------- 1 | import postcss from 'postcss' 2 | import cloneNodes from './cloneNodes' 3 | 4 | export default function responsive(rules) { 5 | return postcss 6 | .atRule({ 7 | name: 'responsive', 8 | }) 9 | .append(cloneNodes(Array.isArray(rules) ? rules : [rules])) 10 | } 11 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/escalade/sync/index.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace escalade { 2 | export type Callback = ( 3 | directory: string, 4 | files: string[], 5 | ) => string | false | void; 6 | } 7 | 8 | declare function escalade( 9 | directory: string, 10 | callback: escalade.Callback, 11 | ): string | void; 12 | 13 | export = escalade; 14 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@pkgjs/parseargs/internal/util.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // This is a placeholder for util.js in node.js land. 4 | 5 | const { 6 | ObjectCreate, 7 | ObjectFreeze, 8 | } = require('./primordials'); 9 | 10 | const kEmptyObject = ObjectFreeze(ObjectCreate(null)); 11 | 12 | module.exports = { 13 | kEmptyObject, 14 | }; 15 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/providers/filters/error.d.ts: -------------------------------------------------------------------------------- 1 | import Settings from '../../settings'; 2 | import { ErrorFilterFunction } from '../../types'; 3 | export default class ErrorFilter { 4 | private readonly _settings; 5 | constructor(_settings: Settings); 6 | getFilter(): ErrorFilterFunction; 7 | private _isNonFatalError; 8 | } 9 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/binary-extensions/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | List of binary file extensions. 3 | 4 | @example 5 | ``` 6 | import binaryExtensions = require('binary-extensions'); 7 | 8 | console.log(binaryExtensions); 9 | //=> ['3ds', '3g2', …] 10 | ``` 11 | */ 12 | declare const binaryExtensions: readonly string[]; 13 | 14 | export = binaryExtensions; 15 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/public/resolve-config.js: -------------------------------------------------------------------------------- 1 | import resolveConfigObjects from '../util/resolveConfig' 2 | import getAllConfigs from '../util/getAllConfigs' 3 | 4 | export default function resolveConfig(...configs) { 5 | let [, ...defaultConfigs] = getAllConfigs(configs[0]) 6 | return resolveConfigObjects([...configs, ...defaultConfigs]) 7 | } 8 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/providers/transformers/entry.d.ts: -------------------------------------------------------------------------------- 1 | import Settings from '../../settings'; 2 | import { EntryTransformerFunction } from '../../types'; 3 | export default class EntryTransformer { 4 | private readonly _settings; 5 | constructor(_settings: Settings); 6 | getTransformer(): EntryTransformerFunction; 7 | private _transform; 8 | } 9 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/utils/index.d.ts: -------------------------------------------------------------------------------- 1 | import * as array from './array'; 2 | import * as errno from './errno'; 3 | import * as fs from './fs'; 4 | import * as path from './path'; 5 | import * as pattern from './pattern'; 6 | import * as stream from './stream'; 7 | import * as string from './string'; 8 | export { array, errno, fs, path, pattern, stream, string }; 9 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/scripts/create-plugin-list.js: -------------------------------------------------------------------------------- 1 | import { corePlugins } from '../src/corePlugins' 2 | import fs from 'fs' 3 | import path from 'path' 4 | 5 | let corePluginList = Object.keys(corePlugins) 6 | 7 | fs.writeFileSync( 8 | path.join(process.cwd(), 'src', 'corePluginList.js'), 9 | `export default ${JSON.stringify(corePluginList)}` 10 | ) 11 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/postcss-load-config/src/req.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line n/no-deprecated-api 2 | const { createRequire, createRequireFromPath } = require('module') 3 | 4 | function req (name, rootFile) { 5 | const create = createRequire || createRequireFromPath 6 | const require = create(rootFile) 7 | return require(name) 8 | } 9 | 10 | module.exports = req 11 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/types/index.d.ts: -------------------------------------------------------------------------------- 1 | import type { PluginCreator } from 'postcss' 2 | import type { Config } from './config.d' 3 | 4 | declare const plugin: PluginCreator 5 | 6 | declare type _Config = Config 7 | declare namespace plugin { 8 | export type { _Config as Config } 9 | } 10 | 11 | export = plugin 12 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/.bin/yaml: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import { UserError, cli, help } from './dist/cli.mjs' 4 | 5 | cli(process.stdin, error => { 6 | if (error instanceof UserError) { 7 | if (error.code === UserError.ARGS) console.error(`${help}\n`) 8 | console.error(error.message) 9 | process.exitCode = error.code 10 | } else if (error) throw error 11 | }) 12 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/postcss-plugins/nesting/index.js: -------------------------------------------------------------------------------- 1 | import { nesting } from './plugin' 2 | 3 | export default Object.assign( 4 | function (opts) { 5 | return { 6 | postcssPlugin: 'tailwindcss/nesting', 7 | Once(root, { result }) { 8 | return nesting(opts)(root, result) 9 | }, 10 | } 11 | }, 12 | { postcss: true } 13 | ) 14 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/cloneDeep.js: -------------------------------------------------------------------------------- 1 | export function cloneDeep(value) { 2 | if (Array.isArray(value)) { 3 | return value.map((child) => cloneDeep(child)) 4 | } 5 | 6 | if (typeof value === 'object' && value !== null) { 7 | return Object.fromEntries(Object.entries(value).map(([k, v]) => [k, cloneDeep(v)])) 8 | } 9 | 10 | return value 11 | } 12 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/browserslist/error.js: -------------------------------------------------------------------------------- 1 | function BrowserslistError(message) { 2 | this.name = 'BrowserslistError' 3 | this.message = message 4 | this.browserslist = true 5 | if (Error.captureStackTrace) { 6 | Error.captureStackTrace(this, BrowserslistError) 7 | } 8 | } 9 | 10 | BrowserslistError.prototype = Error.prototype 11 | 12 | module.exports = BrowserslistError 13 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/supports-preserve-symlinks-flag/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = ( 4 | // node 12+ 5 | process.allowedNodeEnvironmentFlags && process.allowedNodeEnvironmentFlags.has('--preserve-symlinks') 6 | ) || ( 7 | // node v6.2 - v11 8 | String(module.constructor._findPath).indexOf('preserveSymlinks') >= 0 // eslint-disable-line no-underscore-dangle 9 | ); 10 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/yaml/bin.mjs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import { UserError, cli, help } from './dist/cli.mjs' 4 | 5 | cli(process.stdin, error => { 6 | if (error instanceof UserError) { 7 | if (error.code === UserError.ARGS) console.error(`${help}\n`) 8 | console.error(error.message) 9 | process.exitCode = error.code 10 | } else if (error) throw error 11 | }) 12 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/utils/string.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.isEmpty = exports.isString = void 0; 4 | function isString(input) { 5 | return typeof input === 'string'; 6 | } 7 | exports.isString = isString; 8 | function isEmpty(input) { 9 | return input === ''; 10 | } 11 | exports.isEmpty = isEmpty; 12 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/function-bind/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | 4 | "extends": "@ljharb", 5 | 6 | "rules": { 7 | "func-name-matching": 0, 8 | "indent": [2, 4], 9 | "no-new-func": [1], 10 | }, 11 | 12 | "overrides": [ 13 | { 14 | "files": "test/**", 15 | "rules": { 16 | "max-lines-per-function": 0, 17 | "strict": [0] 18 | }, 19 | }, 20 | ], 21 | } 22 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/postcss-js/process-result.js: -------------------------------------------------------------------------------- 1 | let objectify = require('./objectifier') 2 | 3 | module.exports = function processResult(result) { 4 | if (console && console.warn) { 5 | result.warnings().forEach(warn => { 6 | let source = warn.plugin || 'PostCSS' 7 | console.warn(source + ': ' + warn.text) 8 | }) 9 | } 10 | return objectify(result.root) 11 | } 12 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mylib", 3 | "version": "0.0.0", 4 | "description": "", 5 | "private": true, 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "buffer": "*" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/cli-peer-dependencies.js: -------------------------------------------------------------------------------- 1 | export function lazyPostcss() { 2 | return require('postcss') 3 | } 4 | 5 | export function lazyPostcssImport() { 6 | return require('postcss-import') 7 | } 8 | 9 | export function lazyAutoprefixer() { 10 | return require('autoprefixer') 11 | } 12 | 13 | export function lazyCssnano() { 14 | return require('cssnano') 15 | } 16 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/thenify/History.md: -------------------------------------------------------------------------------- 1 | 2 | 3.3.1 / 2020-06-18 3 | ================== 4 | 5 | **fixes** 6 | * [[`0d94a24`](http://github.com/thenables/thenify/commit/0d94a24eb933bc835d568f3009f4d269c4c4c17a)] - fix: remove eval (#30) (Yiyu He <>) 7 | 8 | 3.3.0 / 2017-05-19 9 | ================== 10 | 11 | * feat: support options.multiArgs and options.withCallback (#27) 12 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/util-deprecate/History.md: -------------------------------------------------------------------------------- 1 | 2 | 1.0.2 / 2015-10-07 3 | ================== 4 | 5 | * use try/catch when checking `localStorage` (#3, @kumavis) 6 | 7 | 1.0.1 / 2014-11-25 8 | ================== 9 | 10 | * browser: use `console.warn()` for deprecation calls 11 | * browser: more jsdocs 12 | 13 | 1.0.0 / 2014-04-30 14 | ================== 15 | 16 | * initial commit 17 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@isaacs/cliui/index.mjs: -------------------------------------------------------------------------------- 1 | // Bootstrap cliui with ESM dependencies: 2 | import { cliui } from './build/lib/index.js' 3 | 4 | import stringWidth from 'string-width' 5 | import stripAnsi from 'strip-ansi' 6 | import wrap from 'wrap-ansi' 7 | 8 | export default function ui (opts) { 9 | return cliui(opts, { 10 | stringWidth, 11 | stripAnsi, 12 | wrap 13 | }) 14 | } 15 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts: -------------------------------------------------------------------------------- 1 | import type Settings from '../settings'; 2 | import type { Entry } from '../types'; 3 | export declare function read(directory: string, settings: Settings): Entry[]; 4 | export declare function readdirWithFileTypes(directory: string, settings: Settings): Entry[]; 5 | export declare function readdir(directory: string, settings: Settings): Entry[]; 6 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/escalade/index.d.ts: -------------------------------------------------------------------------------- 1 | type Promisable = T | Promise; 2 | 3 | declare namespace escalade { 4 | export type Callback = ( 5 | directory: string, 6 | files: string[], 7 | ) => Promisable; 8 | } 9 | 10 | declare function escalade( 11 | directory: string, 12 | callback: escalade.Callback, 13 | ): Promise; 14 | 15 | export = escalade; 16 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@pkgjs/parseargs/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Copied from Node.js to ease compatibility in PR. 7 | [*] 8 | charset = utf-8 9 | end_of_line = lf 10 | indent_size = 2 11 | indent_style = space 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | quote_type = single 15 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/is-binary-path/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Check if a file path is a binary file. 3 | 4 | @example 5 | ``` 6 | import isBinaryPath = require('is-binary-path'); 7 | 8 | isBinaryPath('source/unicorn.png'); 9 | //=> true 10 | 11 | isBinaryPath('source/unicorn.txt'); 12 | //=> false 13 | ``` 14 | */ 15 | declare function isBinaryPath(filePath: string): boolean; 16 | 17 | export = isBinaryPath; 18 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/postcss-js/sync.js: -------------------------------------------------------------------------------- 1 | let postcss = require('postcss') 2 | 3 | let processResult = require('./process-result') 4 | let parse = require('./parser') 5 | 6 | module.exports = function (plugins) { 7 | let processor = postcss(plugins) 8 | return input => { 9 | let result = processor.process(input, { parser: parse, from: undefined }) 10 | return processResult(result) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /trl/benchmark/benchmark_level1.sh: -------------------------------------------------------------------------------- 1 | # hello world experiment 2 | python benchmark/benchmark.py \ 3 | --command "python examples/scripts/ppo.py --ppo_config.log_with wandb" \ 4 | --num-seeds 3 \ 5 | --start-seed 1 \ 6 | --workers 10 \ 7 | --slurm-nodes 1 \ 8 | --slurm-gpus-per-task 1 \ 9 | --slurm-ntasks 1 \ 10 | --slurm-total-cpus 12 \ 11 | --slurm-template-path benchmark/trl.slurm_template 12 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@my-scope/package-a", 3 | "version": "0.0.0", 4 | "private": true, 5 | "description": "", 6 | "license": "MIT", 7 | "main": "index.js", 8 | "scripts": { 9 | "test": "echo \"Error: run tests from root\" && exit 1" 10 | }, 11 | "dependencies": { 12 | "@my-scope/package-b": "^0.0.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@my-scope/package-b", 3 | "private": true, 4 | "version": "0.0.0", 5 | "description": "", 6 | "license": "MIT", 7 | "main": "index.js", 8 | "scripts": { 9 | "test": "echo \"Error: run tests from root\" && exit 1" 10 | }, 11 | "dependencies": { 12 | "@my-scope/package-a": "^0.0.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /trl/examples/accelerate_configs/multi_gpu.yaml: -------------------------------------------------------------------------------- 1 | compute_environment: LOCAL_MACHINE 2 | debug: false 3 | distributed_type: MULTI_GPU 4 | downcast_bf16: 'no' 5 | gpu_ids: all 6 | machine_rank: 0 7 | main_training_function: main 8 | mixed_precision: 'bf16' 9 | num_machines: 1 10 | num_processes: 8 11 | rdzv_backend: static 12 | same_network: true 13 | tpu_env: [] 14 | tpu_use_cluster: false 15 | tpu_use_sudo: false 16 | use_cpu: false 17 | -------------------------------------------------------------------------------- /trl/examples/accelerate_configs/single_gpu.yaml: -------------------------------------------------------------------------------- 1 | compute_environment: LOCAL_MACHINE 2 | debug: false 3 | distributed_type: "NO" 4 | downcast_bf16: 'no' 5 | gpu_ids: all 6 | machine_rank: 0 7 | main_training_function: main 8 | mixed_precision: 'bf16' 9 | num_machines: 1 10 | num_processes: 8 11 | rdzv_backend: static 12 | same_network: true 13 | tpu_env: [] 14 | tpu_use_cluster: false 15 | tpu_use_sudo: false 16 | use_cpu: false 17 | -------------------------------------------------------------------------------- /trl/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.black] 2 | line-length = 119 3 | target-version = ['py38'] 4 | 5 | [tool.ruff] 6 | ignore = ["E501", "E741", "W605"] 7 | select = ["E", "F", "I", "W"] 8 | line-length = 119 9 | 10 | # Ignore import violations in all `__init__.py` files. 11 | [tool.ruff.per-file-ignores] 12 | "__init__.py" = ["E402", "F401", "F403", "F811"] 13 | 14 | [tool.ruff.isort] 15 | lines-after-imports = 2 16 | known-first-party = ["trl"] 17 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts: -------------------------------------------------------------------------------- 1 | import SyncReader from '../readers/sync'; 2 | import type Settings from '../settings'; 3 | import type { Entry } from '../types'; 4 | export default class SyncProvider { 5 | private readonly _root; 6 | private readonly _settings; 7 | protected readonly _reader: SyncReader; 8 | constructor(_root: string, _settings: Settings); 9 | read(): Entry[]; 10 | } 11 | -------------------------------------------------------------------------------- /alignment-handbook/recipes/accelerate_configs/multi_gpu.yaml: -------------------------------------------------------------------------------- 1 | compute_environment: LOCAL_MACHINE 2 | debug: false 3 | distributed_type: MULTI_GPU 4 | downcast_bf16: 'no' 5 | gpu_ids: all 6 | machine_rank: 0 7 | main_training_function: main 8 | mixed_precision: bf16 9 | num_machines: 1 10 | num_processes: 4 11 | rdzv_backend: static 12 | same_network: true 13 | tpu_env: [] 14 | tpu_use_cluster: false 15 | tpu_use_sudo: false 16 | use_cpu: false 17 | -------------------------------------------------------------------------------- /alignment-handbook/chat-frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/.bin/jiti: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const { resolve } = require("node:path"); 4 | 5 | const script = process.argv.splice(2, 1)[0]; 6 | 7 | if (!script) { 8 | 9 | console.error("Usage: jiti [...arguments]"); 10 | process.exit(1); 11 | } 12 | 13 | const pwd = process.cwd(); 14 | const jiti = require("..")(pwd); 15 | const resolved = (process.argv[1] = jiti.resolve(resolve(pwd, script))); 16 | jiti(resolved); 17 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/subdirs.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var resolve = require('../'); 3 | var path = require('path'); 4 | 5 | test('subdirs', function (t) { 6 | t.plan(2); 7 | 8 | var dir = path.join(__dirname, '/subdirs'); 9 | resolve('a/b/c/x.json', { basedir: dir }, function (err, res) { 10 | t.ifError(err); 11 | t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json')); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/reusify/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | sudo: false 3 | 4 | node_js: 5 | - 9 6 | - 8 7 | - 7 8 | - 6 9 | - 5 10 | - 4 11 | - 4.0 12 | - iojs-v3 13 | - iojs-v2 14 | - iojs-v1 15 | - 0.12 16 | - 0.10 17 | 18 | cache: 19 | directories: 20 | - node_modules 21 | 22 | after_script: 23 | - npm run coverage 24 | 25 | notifications: 26 | email: 27 | on_success: never 28 | on_failure: always 29 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/strip-ansi/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. 3 | 4 | @example 5 | ``` 6 | import stripAnsi from 'strip-ansi'; 7 | 8 | stripAnsi('\u001B[4mUnicorn\u001B[0m'); 9 | //=> 'Unicorn' 10 | 11 | stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); 12 | //=> 'Click' 13 | ``` 14 | */ 15 | export default function stripAnsi(string: string): string; 16 | -------------------------------------------------------------------------------- /alignment-handbook/chat-frontend/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/jiti/bin/jiti.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const { resolve } = require("node:path"); 4 | 5 | const script = process.argv.splice(2, 1)[0]; 6 | 7 | if (!script) { 8 | 9 | console.error("Usage: jiti [...arguments]"); 10 | process.exit(1); 11 | } 12 | 13 | const pwd = process.cwd(); 14 | const jiti = require("..")(pwd); 15 | const resolved = (process.argv[1] = jiti.resolve(resolve(pwd, script))); 16 | jiti(resolved); 17 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/string-width-cjs/node_modules/ansi-regex/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = ({onlyFirst = false} = {}) => { 4 | const pattern = [ 5 | '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', 6 | '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' 7 | ].join('|'); 8 | 9 | return new RegExp(pattern, onlyFirst ? undefined : 'g'); 10 | }; 11 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = ({onlyFirst = false} = {}) => { 4 | const pattern = [ 5 | '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', 6 | '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' 7 | ].join('|'); 8 | 9 | return new RegExp(pattern, onlyFirst ? undefined : 'g'); 10 | }; 11 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = ({onlyFirst = false} = {}) => { 4 | const pattern = [ 5 | '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', 6 | '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' 7 | ].join('|'); 8 | 9 | return new RegExp(pattern, onlyFirst ? undefined : 'g'); 10 | }; 11 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.walk/out/readers/reader.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | const common = require("./common"); 4 | class Reader { 5 | constructor(_root, _settings) { 6 | this._root = _root; 7 | this._settings = _settings; 8 | this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); 9 | } 10 | } 11 | exports.default = Reader; 12 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/is-core-module/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@ljharb", 3 | "root": true, 4 | "rules": { 5 | "func-style": 1, 6 | }, 7 | "overrides": [ 8 | { 9 | "files": "test/**", 10 | "rules": { 11 | "global-require": 0, 12 | "max-depth": 0, 13 | "max-lines-per-function": 0, 14 | "no-negated-condition": 0, 15 | }, 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/postcss-js/async.js: -------------------------------------------------------------------------------- 1 | let postcss = require('postcss') 2 | 3 | let processResult = require('./process-result') 4 | let parse = require('./parser') 5 | 6 | module.exports = function async(plugins) { 7 | let processor = postcss(plugins) 8 | return async input => { 9 | let result = await processor.process(input, { 10 | parser: parse, 11 | from: undefined 12 | }) 13 | return processResult(result) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /alignment-handbook/src/alignment/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = "0.3.0.dev0" 2 | 3 | from .configs import DataArguments, DPOConfig, H4ArgumentParser, ModelArguments, SFTConfig 4 | from .data import apply_chat_template, get_datasets 5 | from .generate_trainer import Sampler 6 | from .model_utils import ( 7 | get_checkpoint, 8 | get_kbit_device_map, 9 | get_peft_config, 10 | get_quantization_config, 11 | get_tokenizer, 12 | is_adapter_model, 13 | ) 14 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/color-name/README.md: -------------------------------------------------------------------------------- 1 | A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. 2 | 3 | [![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) 4 | 5 | 6 | ```js 7 | var colors = require('color-name'); 8 | colors.red //[255,0,0] 9 | ``` 10 | 11 | 12 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/providers/sync.d.ts: -------------------------------------------------------------------------------- 1 | import { Task } from '../managers/tasks'; 2 | import ReaderSync from '../readers/sync'; 3 | import { Entry, EntryItem, ReaderOptions } from '../types'; 4 | import Provider from './provider'; 5 | export default class ProviderSync extends Provider { 6 | protected _reader: ReaderSync; 7 | read(task: Task): EntryItem[]; 8 | api(root: string, task: Task, options: ReaderOptions): Entry[]; 9 | } 10 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/source-map-js/source-map.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2011 Mozilla Foundation and contributors 3 | * Licensed under the New BSD license. See LICENSE.txt or: 4 | * http://opensource.org/licenses/BSD-3-Clause 5 | */ 6 | exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; 7 | exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; 8 | exports.SourceNode = require('./lib/source-node').SourceNode; 9 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.walk/out/providers/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.SyncProvider = exports.StreamProvider = exports.AsyncProvider = void 0; 4 | const async_1 = require("./async"); 5 | exports.AsyncProvider = async_1.default; 6 | const stream_1 = require("./stream"); 7 | exports.StreamProvider = stream_1.default; 8 | const sync_1 = require("./sync"); 9 | exports.SyncProvider = sync_1.default; 10 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register.d.ts: -------------------------------------------------------------------------------- 1 | import Promise = require('./index'); 2 | 3 | declare function register (module?: string, options?: register.Options): register.Register; 4 | 5 | declare namespace register { 6 | export interface Register { 7 | Promise: typeof Promise; 8 | implementation: string; 9 | } 10 | 11 | export interface Options { 12 | Promise?: typeof Promise; 13 | global?: boolean 14 | } 15 | } 16 | 17 | export = register; 18 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/queue-microtask/index.js: -------------------------------------------------------------------------------- 1 | /*! queue-microtask. MIT License. Feross Aboukhadijeh */ 2 | let promise 3 | 4 | module.exports = typeof queueMicrotask === 'function' 5 | ? queueMicrotask.bind(typeof window !== 'undefined' ? window : global) 6 | // reuse resolved promise, and allocate it lazily 7 | : cb => (promise || (promise = Promise.resolve())) 8 | .then(cb) 9 | .catch(err => setTimeout(() => { throw err }, 0)) 10 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/strip-ansi-cjs/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. 3 | 4 | @example 5 | ``` 6 | import stripAnsi = require('strip-ansi'); 7 | 8 | stripAnsi('\u001B[4mUnicorn\u001B[0m'); 9 | //=> 'Unicorn' 10 | 11 | stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); 12 | //=> 'Click' 13 | ``` 14 | */ 15 | declare function stripAnsi(string: string): string; 16 | 17 | export = stripAnsi; 18 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/defaults.js: -------------------------------------------------------------------------------- 1 | export function defaults(target, ...sources) { 2 | for (let source of sources) { 3 | for (let k in source) { 4 | if (!target?.hasOwnProperty?.(k)) { 5 | target[k] = source[k] 6 | } 7 | } 8 | 9 | for (let k of Object.getOwnPropertySymbols(source)) { 10 | if (!target?.hasOwnProperty?.(k)) { 11 | target[k] = source[k] 12 | } 13 | } 14 | } 15 | 16 | return target 17 | } 18 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/providers/async.d.ts: -------------------------------------------------------------------------------- 1 | import { Task } from '../managers/tasks'; 2 | import { Entry, EntryItem, ReaderOptions } from '../types'; 3 | import ReaderAsync from '../readers/async'; 4 | import Provider from './provider'; 5 | export default class ProviderAsync extends Provider> { 6 | protected _reader: ReaderAsync; 7 | read(task: Task): Promise; 8 | api(root: string, task: Task, options: ReaderOptions): Promise; 9 | } 10 | -------------------------------------------------------------------------------- /alignment-handbook/.github/workflows/upload_pr_documentation.yml: -------------------------------------------------------------------------------- 1 | name: Upload PR Documentation 2 | 3 | on: 4 | workflow_run: 5 | workflows: ["Build PR Documentation"] 6 | types: 7 | - completed 8 | 9 | jobs: 10 | build: 11 | uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@main 12 | with: 13 | package_name: alignment-handbook 14 | secrets: 15 | hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} 16 | comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }} -------------------------------------------------------------------------------- /alignment-handbook/node_modules/string-width-cjs/node_modules/strip-ansi/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. 3 | 4 | @example 5 | ``` 6 | import stripAnsi = require('strip-ansi'); 7 | 8 | stripAnsi('\u001B[4mUnicorn\u001B[0m'); 9 | //=> 'Unicorn' 10 | 11 | stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); 12 | //=> 'Click' 13 | ``` 14 | */ 15 | declare function stripAnsi(string: string): string; 16 | 17 | export = stripAnsi; 18 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. 3 | 4 | @example 5 | ``` 6 | import stripAnsi = require('strip-ansi'); 7 | 8 | stripAnsi('\u001B[4mUnicorn\u001B[0m'); 9 | //=> 'Unicorn' 10 | 11 | stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); 12 | //=> 'Click' 13 | ``` 14 | */ 15 | declare function stripAnsi(string: string): string; 16 | 17 | export = stripAnsi; 18 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/eastasianwidth/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eastasianwidth", 3 | "version": "0.2.0", 4 | "description": "Get East Asian Width from a character.", 5 | "main": "eastasianwidth.js", 6 | "files": [ 7 | "eastasianwidth.js" 8 | ], 9 | "scripts": { 10 | "test": "mocha" 11 | }, 12 | "repository": "git://github.com/komagata/eastasianwidth.git", 13 | "author": "Masaki Komagata", 14 | "license": "MIT", 15 | "devDependencies": { 16 | "mocha": "~1.9.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/shebang-command/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const shebangRegex = require('shebang-regex'); 3 | 4 | module.exports = (string = '') => { 5 | const match = string.match(shebangRegex); 6 | 7 | if (!match) { 8 | return null; 9 | } 10 | 11 | const [path, argument] = match[0].replace(/#! ?/, '').split(' '); 12 | const binary = path.split('/').pop(); 13 | 14 | if (binary === 'env') { 15 | return argument; 16 | } 17 | 18 | return argument ? `${binary} ${argument}` : binary; 19 | }; 20 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { Readable } from 'stream'; 3 | import AsyncReader from '../readers/async'; 4 | import type Settings from '../settings'; 5 | export default class StreamProvider { 6 | private readonly _root; 7 | private readonly _settings; 8 | protected readonly _reader: AsyncReader; 9 | protected readonly _stream: Readable; 10 | constructor(_root: string, _settings: Settings); 11 | read(): Readable; 12 | } 13 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.walk/out/providers/sync.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | const sync_1 = require("../readers/sync"); 4 | class SyncProvider { 5 | constructor(_root, _settings) { 6 | this._root = _root; 7 | this._settings = _settings; 8 | this._reader = new sync_1.default(this._root, this._settings); 9 | } 10 | read() { 11 | return this._reader.read(); 12 | } 13 | } 14 | exports.default = SyncProvider; 15 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/path-key/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const pathKey = (options = {}) => { 4 | const environment = options.env || process.env; 5 | const platform = options.platform || process.platform; 6 | 7 | if (platform !== 'win32') { 8 | return 'PATH'; 9 | } 10 | 11 | return Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path'; 12 | }; 13 | 14 | module.exports = pathKey; 15 | // TODO: Remove this for the next major release 16 | module.exports.default = pathKey; 17 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/escalade/sync/index.mjs: -------------------------------------------------------------------------------- 1 | import { dirname, resolve } from 'path'; 2 | import { readdirSync, statSync } from 'fs'; 3 | 4 | export default function (start, callback) { 5 | let dir = resolve('.', start); 6 | let tmp, stats = statSync(dir); 7 | 8 | if (!stats.isDirectory()) { 9 | dir = dirname(dir); 10 | } 11 | 12 | while (true) { 13 | tmp = callback(dir, readdirSync(dir)); 14 | if (tmp) return resolve(dir, tmp); 15 | dir = dirname(tmp = dir); 16 | if (tmp === dir) break; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/is-number/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * is-number 3 | * 4 | * Copyright (c) 2014-present, Jon Schlinkert. 5 | * Released under the MIT License. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | module.exports = function(num) { 11 | if (typeof num === 'number') { 12 | return num - num === 0; 13 | } 14 | if (typeof num === 'string' && num.trim() !== '') { 15 | return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); 16 | } 17 | return false; 18 | }; 19 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/plugin.d.ts: -------------------------------------------------------------------------------- 1 | import type { Config, PluginCreator } from './types/config' 2 | type Plugin = { 3 | withOptions( 4 | plugin: (options: T) => PluginCreator, 5 | config?: (options: T) => Partial 6 | ): { (options: T): { handler: PluginCreator; config?: Partial }; __isOptionsFunction: true } 7 | (plugin: PluginCreator, config?: Partial): { handler: PluginCreator; config?: Partial } 8 | } 9 | 10 | declare const plugin: Plugin 11 | export = plugin 12 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/flattenColorPalette.js: -------------------------------------------------------------------------------- 1 | const flattenColorPalette = (colors) => 2 | Object.assign( 3 | {}, 4 | ...Object.entries(colors ?? {}).flatMap(([color, values]) => 5 | typeof values == 'object' 6 | ? Object.entries(flattenColorPalette(values)).map(([number, hex]) => ({ 7 | [color + (number === 'DEFAULT' ? '' : `-${number}`)]: hex, 8 | })) 9 | : [{ [`${color}`]: values }] 10 | ) 11 | ) 12 | 13 | export default flattenColorPalette 14 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/value-parser/walk.js: -------------------------------------------------------------------------------- 1 | module.exports = function walk(nodes, cb, bubble) { 2 | var i, max, node, result 3 | 4 | for (i = 0, max = nodes.length; i < max; i += 1) { 5 | node = nodes[i] 6 | if (!bubble) { 7 | result = cb(node, i, nodes) 8 | } 9 | 10 | if (result !== false && node.type === 'function' && Array.isArray(node.nodes)) { 11 | walk(node.nodes, cb, bubble) 12 | } 13 | 14 | if (bubble) { 15 | cb(node, i, nodes) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.scandir/out/providers/common.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.joinPathSegments = void 0; 4 | function joinPathSegments(a, b, separator) { 5 | /** 6 | * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). 7 | */ 8 | if (a.endsWith(separator)) { 9 | return a + b; 10 | } 11 | return a + separator + b; 12 | } 13 | exports.joinPathSegments = joinPathSegments; 14 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/ansi-regex/index.js: -------------------------------------------------------------------------------- 1 | export default function ansiRegex({onlyFirst = false} = {}) { 2 | // Valid string terminator sequences are BEL, ESC\, and 0x9c 3 | const ST = '(?:\\u0007|\\u001B\\u005C|\\u009C)'; 4 | const pattern = [ 5 | `[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`, 6 | '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))', 7 | ].join('|'); 8 | 9 | return new RegExp(pattern, onlyFirst ? undefined : 'g'); 10 | } 11 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/escalade/sync/index.js: -------------------------------------------------------------------------------- 1 | const { dirname, resolve } = require('path'); 2 | const { readdirSync, statSync } = require('fs'); 3 | 4 | module.exports = function (start, callback) { 5 | let dir = resolve('.', start); 6 | let tmp, stats = statSync(dir); 7 | 8 | if (!stats.isDirectory()) { 9 | dir = dirname(dir); 10 | } 11 | 12 | while (true) { 13 | tmp = callback(dir, readdirSync(dir)); 14 | if (tmp) return resolve(dir, tmp); 15 | dir = dirname(tmp = dir); 16 | if (tmp === dir) break; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/providers/stream.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { Readable } from 'stream'; 3 | import { Task } from '../managers/tasks'; 4 | import ReaderStream from '../readers/stream'; 5 | import { ReaderOptions } from '../types'; 6 | import Provider from './provider'; 7 | export default class ProviderStream extends Provider { 8 | protected _reader: ReaderStream; 9 | read(task: Task): Readable; 10 | api(root: string, task: Task, options: ReaderOptions): Readable; 11 | } 12 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/update-browserslist-db/check-npm-version.js: -------------------------------------------------------------------------------- 1 | let { execSync } = require('child_process') 2 | let pico = require('picocolors') 3 | 4 | try { 5 | let version = parseInt(execSync('npm -v')) 6 | if (version <= 6) { 7 | process.stderr.write( 8 | pico.red( 9 | 'Update npm or call ' + 10 | pico.yellow('npx browserslist@latest --update-db') + 11 | '\n' 12 | ) 13 | ) 14 | process.exit(1) 15 | } 16 | // eslint-disable-next-line no-unused-vars 17 | } catch (e) {} 18 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/multirepo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ljharb-monorepo-symlink-test", 3 | "private": true, 4 | "version": "0.0.0", 5 | "description": "", 6 | "main": "index.js", 7 | "scripts": { 8 | "postinstall": "lerna bootstrap", 9 | "test": "node packages/package-a" 10 | }, 11 | "author": "", 12 | "license": "MIT", 13 | "dependencies": { 14 | "jquery": "^3.3.1", 15 | "resolve": "../../../" 16 | }, 17 | "devDependencies": { 18 | "lerna": "^3.4.3" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /alignment-handbook/.github/workflows/build_documentation.yml: -------------------------------------------------------------------------------- 1 | name: Build documentation 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | build: 10 | uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@main 11 | with: 12 | commit_sha: ${{ github.sha }} 13 | package: alignment-handbook 14 | path_to_docs: alignment-handbook/chapters/ 15 | additional_args: --not_python_module 16 | languages: en 17 | secrets: 18 | hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} 19 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/readers/async.d.ts: -------------------------------------------------------------------------------- 1 | import * as fsWalk from '@nodelib/fs.walk'; 2 | import { Entry, ReaderOptions, Pattern } from '../types'; 3 | import Reader from './reader'; 4 | import ReaderStream from './stream'; 5 | export default class ReaderAsync extends Reader> { 6 | protected _walkAsync: typeof fsWalk.walk; 7 | protected _readerStream: ReaderStream; 8 | dynamic(root: string, options: ReaderOptions): Promise; 9 | static(patterns: Pattern[], options: ReaderOptions): Promise; 10 | } 11 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/providers/filters/error.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | const utils = require("../../utils"); 4 | class ErrorFilter { 5 | constructor(_settings) { 6 | this._settings = _settings; 7 | } 8 | getFilter() { 9 | return (error) => this._isNonFatalError(error); 10 | } 11 | _isNonFatalError(error) { 12 | return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors; 13 | } 14 | } 15 | exports.default = ErrorFilter; 16 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/is-extglob/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * is-extglob 3 | * 4 | * Copyright (c) 2014-2016, Jon Schlinkert. 5 | * Licensed under the MIT License. 6 | */ 7 | 8 | module.exports = function isExtglob(str) { 9 | if (typeof str !== 'string' || str === '') { 10 | return false; 11 | } 12 | 13 | var match; 14 | while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { 15 | if (match[2]) return true; 16 | str = str.slice(match.index + match[0].length); 17 | } 18 | 19 | return false; 20 | }; 21 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/strip-ansi/index.js: -------------------------------------------------------------------------------- 1 | import ansiRegex from 'ansi-regex'; 2 | 3 | const regex = ansiRegex(); 4 | 5 | export default function stripAnsi(string) { 6 | if (typeof string !== 'string') { 7 | throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); 8 | } 9 | 10 | // Even though the regex is global, we don't need to reset the `.lastIndex` 11 | // because unlike `.exec()` and `.test()`, `.replace()` does it automatically 12 | // and doing it manually has a performance penalty. 13 | return string.replace(regex, ''); 14 | } 15 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.walk/out/readers/common.d.ts: -------------------------------------------------------------------------------- 1 | import type { FilterFunction } from '../settings'; 2 | import type Settings from '../settings'; 3 | import type { Errno } from '../types'; 4 | export declare function isFatalError(settings: Settings, error: Errno): boolean; 5 | export declare function isAppliedFilter(filter: FilterFunction | null, value: T): boolean; 6 | export declare function replacePathSegmentSeparator(filepath: string, separator: string): string; 7 | export declare function joinPathSegments(a: string, b: string, separator: string): string; 8 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/parseObjectStyles.js: -------------------------------------------------------------------------------- 1 | import postcss from 'postcss' 2 | import postcssNested from 'postcss-nested' 3 | import postcssJs from 'postcss-js' 4 | 5 | export default function parseObjectStyles(styles) { 6 | if (!Array.isArray(styles)) { 7 | return parseObjectStyles([styles]) 8 | } 9 | 10 | return styles.flatMap((style) => { 11 | return postcss([ 12 | postcssNested({ 13 | bubble: ['screen'], 14 | }), 15 | ]).process(style, { 16 | parser: postcssJs, 17 | }).root.nodes 18 | }) 19 | } 20 | -------------------------------------------------------------------------------- /trl/examples/accelerate_configs/deepspeed_zero1.yaml: -------------------------------------------------------------------------------- 1 | compute_environment: LOCAL_MACHINE 2 | debug: false 3 | deepspeed_config: 4 | deepspeed_multinode_launcher: standard 5 | gradient_accumulation_steps: 1 6 | zero3_init_flag: false 7 | zero_stage: 1 8 | distributed_type: DEEPSPEED 9 | downcast_bf16: 'no' 10 | machine_rank: 0 11 | main_training_function: main 12 | mixed_precision: 'bf16' 13 | num_machines: 1 14 | num_processes: 8 15 | rdzv_backend: static 16 | same_network: true 17 | tpu_env: [] 18 | tpu_use_cluster: false 19 | tpu_use_sudo: false 20 | use_cpu: false 21 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // These settings are duplicated in .editorconfig: 3 | tabWidth: 2, // indent_size = 2 4 | useTabs: false, // indent_style = space 5 | endOfLine: 'lf', // end_of_line = lf 6 | semi: false, // default: true 7 | singleQuote: true, // default: false 8 | printWidth: 100, // default: 80 9 | trailingComma: 'es5', 10 | bracketSpacing: true, 11 | overrides: [ 12 | { 13 | files: '*.js', 14 | options: { 15 | parser: 'flow', 16 | }, 17 | }, 18 | ], 19 | } 20 | -------------------------------------------------------------------------------- /alignment-handbook/chat-frontend/src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | /* 로딩 애니메이션 딜레이 */ 6 | .animation-delay-200 { 7 | animation-delay: 0.2s; 8 | } 9 | 10 | .animation-delay-400 { 11 | animation-delay: 0.4s; 12 | } 13 | 14 | /* 스크롤바 스타일링 */ 15 | ::-webkit-scrollbar { 16 | width: 8px; 17 | } 18 | 19 | ::-webkit-scrollbar-track { 20 | background: #f1f1f1; 21 | } 22 | 23 | ::-webkit-scrollbar-thumb { 24 | background: #888; 25 | border-radius: 4px; 26 | } 27 | 28 | ::-webkit-scrollbar-thumb:hover { 29 | background: #666; 30 | } -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.walk/out/providers/async.d.ts: -------------------------------------------------------------------------------- 1 | import AsyncReader from '../readers/async'; 2 | import type Settings from '../settings'; 3 | import type { Entry, Errno } from '../types'; 4 | export declare type AsyncCallback = (error: Errno, entries: Entry[]) => void; 5 | export default class AsyncProvider { 6 | private readonly _root; 7 | private readonly _settings; 8 | protected readonly _reader: AsyncReader; 9 | private readonly _storage; 10 | constructor(_root: string, _settings: Settings); 11 | read(callback: AsyncCallback): void; 12 | } 13 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/shebang-regex/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) line. 3 | 4 | @example 5 | ``` 6 | import shebangRegex = require('shebang-regex'); 7 | 8 | const string = '#!/usr/bin/env node\nconsole.log("unicorns");'; 9 | 10 | shebangRegex.test(string); 11 | //=> true 12 | 13 | shebangRegex.exec(string)[0]; 14 | //=> '#!/usr/bin/env node' 15 | 16 | shebangRegex.exec(string)[1]; 17 | //=> '/usr/bin/env node' 18 | ``` 19 | */ 20 | declare const shebangRegex: RegExp; 21 | 22 | export = shebangRegex; 23 | -------------------------------------------------------------------------------- /trl/benchmark/upload_benchmark.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | 3 | import tyro 4 | from huggingface_hub import HfApi 5 | 6 | 7 | @dataclass 8 | class Args: 9 | folder_path: str = "benchmark/trl" 10 | path_in_repo: str = "images/benchmark" 11 | repo_id: str = "trl-internal-testing/example-images" 12 | repo_type: str = "dataset" 13 | 14 | 15 | args = tyro.cli(Args) 16 | api = HfApi() 17 | 18 | api.upload_folder( 19 | folder_path=args.folder_path, 20 | path_in_repo=args.path_in_repo, 21 | repo_id=args.repo_id, 22 | repo_type=args.repo_type, 23 | ) 24 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/node-releases/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-releases", 3 | "version": "2.0.18", 4 | "description": "Node.js releases data", 5 | "type": "module", 6 | "scripts": { 7 | "build": "node scripts/build.js" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/chicoxyzzy/node-releases.git" 12 | }, 13 | "keywords": [ 14 | "nodejs", 15 | "releases" 16 | ], 17 | "author": "Sergey Rubanov ", 18 | "license": "MIT", 19 | "devDependencies": { 20 | "semver": "^7.3.5" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts: -------------------------------------------------------------------------------- 1 | import * as fsScandir from '@nodelib/fs.scandir'; 2 | import type { Entry } from '../types'; 3 | import Reader from './reader'; 4 | export default class SyncReader extends Reader { 5 | protected readonly _scandir: typeof fsScandir.scandirSync; 6 | private readonly _storage; 7 | private readonly _queue; 8 | read(): Entry[]; 9 | private _pushToQueue; 10 | private _handleQueue; 11 | private _handleDirectory; 12 | private _handleError; 13 | private _handleEntry; 14 | private _pushToStorage; 15 | } 16 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/node-releases/README.md: -------------------------------------------------------------------------------- 1 | # Node.js releases data 2 | 3 | All data is located in `data` directory. 4 | 5 | `data/processed` contains `envs.json` with node.js releases data preprocessed to be used by [Browserslist](https://github.com/ai/browserslist) and other projects. Each version in this file contains only necessary info: version, release date, LTS flag/name, and security flag. 6 | 7 | `data/release-schedule` contains `release-schedule.json` with node.js releases date and end of life date. 8 | 9 | ## Installation 10 | ```bash 11 | npm install node-releases 12 | ``` 13 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import type Settings from '../settings'; 3 | import type { Entry } from '../types'; 4 | export declare type AsyncCallback = (error: NodeJS.ErrnoException, entries: Entry[]) => void; 5 | export declare function read(directory: string, settings: Settings, callback: AsyncCallback): void; 6 | export declare function readdirWithFileTypes(directory: string, settings: Settings, callback: AsyncCallback): void; 7 | export declare function readdir(directory: string, settings: Settings, callback: AsyncCallback): void; 8 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/string-width-cjs/node_modules/emoji-regex/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'emoji-regex' { 2 | function emojiRegex(): RegExp; 3 | 4 | export default emojiRegex; 5 | } 6 | 7 | declare module 'emoji-regex/text' { 8 | function emojiRegex(): RegExp; 9 | 10 | export default emojiRegex; 11 | } 12 | 13 | declare module 'emoji-regex/es2015' { 14 | function emojiRegex(): RegExp; 15 | 16 | export default emojiRegex; 17 | } 18 | 19 | declare module 'emoji-regex/es2015/text' { 20 | function emojiRegex(): RegExp; 21 | 22 | export default emojiRegex; 23 | } 24 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'emoji-regex' { 2 | function emojiRegex(): RegExp; 3 | 4 | export default emojiRegex; 5 | } 6 | 7 | declare module 'emoji-regex/text' { 8 | function emojiRegex(): RegExp; 9 | 10 | export default emojiRegex; 11 | } 12 | 13 | declare module 'emoji-regex/es2015' { 14 | function emojiRegex(): RegExp; 15 | 16 | export default emojiRegex; 17 | } 18 | 19 | declare module 'emoji-regex/es2015/text' { 20 | function emojiRegex(): RegExp; 21 | 22 | export default emojiRegex; 23 | } 24 | -------------------------------------------------------------------------------- /trl/docs/source/installation.mdx: -------------------------------------------------------------------------------- 1 | # Installation 2 | You can install TRL either from pypi or from source: 3 | 4 | ## pypi 5 | Install the library with pip: 6 | 7 | ```bash 8 | pip install trl 9 | ``` 10 | 11 | ### Source 12 | You can also install the latest version from source. First clone the repo and then run the installation with `pip`: 13 | 14 | ```bash 15 | git clone https://github.com/huggingface/trl.git 16 | cd trl/ 17 | pip install -e . 18 | ``` 19 | 20 | If you want the development install you can replace the pip install with the following: 21 | 22 | ```bash 23 | pip install -e ".[dev]" 24 | ``` -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/readers/sync.d.ts: -------------------------------------------------------------------------------- 1 | import * as fsStat from '@nodelib/fs.stat'; 2 | import * as fsWalk from '@nodelib/fs.walk'; 3 | import { Entry, Pattern, ReaderOptions } from '../types'; 4 | import Reader from './reader'; 5 | export default class ReaderSync extends Reader { 6 | protected _walkSync: typeof fsWalk.walkSync; 7 | protected _statSync: typeof fsStat.statSync; 8 | dynamic(root: string, options: ReaderOptions): Entry[]; 9 | static(patterns: Pattern[], options: ReaderOptions): Entry[]; 10 | private _getEntry; 11 | private _getStat; 12 | } 13 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/nanoid/non-secure/index.js: -------------------------------------------------------------------------------- 1 | let urlAlphabet = 2 | 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' 3 | let customAlphabet = (alphabet, defaultSize = 21) => { 4 | return (size = defaultSize) => { 5 | let id = '' 6 | let i = size 7 | while (i--) { 8 | id += alphabet[(Math.random() * alphabet.length) | 0] 9 | } 10 | return id 11 | } 12 | } 13 | let nanoid = (size = 21) => { 14 | let id = '' 15 | let i = size 16 | while (i--) { 17 | id += urlAlphabet[(Math.random() * 64) | 0] 18 | } 19 | return id 20 | } 21 | export { nanoid, customAlphabet } 22 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/scripts/release-channel.js: -------------------------------------------------------------------------------- 1 | // Given a version, figure out what the release channel is so that we can publish to the correct 2 | // channel on npm. 3 | // 4 | // E.g.: 5 | // 6 | // 1.2.3 -> latest (default) 7 | // 0.0.0-insiders.ffaa88 -> insiders 8 | // 4.1.0-alpha.4 -> alpha 9 | 10 | let version = 11 | process.argv[2] || process.env.npm_package_version || require('../package.json').version 12 | 13 | let match = /\d+\.\d+\.\d+-(.*)\.\d+/g.exec(version) 14 | if (match) { 15 | console.log(match[1]) 16 | } else { 17 | console.log('latest') 18 | } 19 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.stat/out/settings.d.ts: -------------------------------------------------------------------------------- 1 | import * as fs from './adapters/fs'; 2 | export interface Options { 3 | followSymbolicLink?: boolean; 4 | fs?: Partial; 5 | markSymbolicLink?: boolean; 6 | throwErrorOnBrokenSymbolicLink?: boolean; 7 | } 8 | export default class Settings { 9 | private readonly _options; 10 | readonly followSymbolicLink: boolean; 11 | readonly fs: fs.FileSystemAdapter; 12 | readonly markSymbolicLink: boolean; 13 | readonly throwErrorOnBrokenSymbolicLink: boolean; 14 | constructor(_options?: Options); 15 | private _getValue; 16 | } 17 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/nanoid/non-secure/index.cjs: -------------------------------------------------------------------------------- 1 | let urlAlphabet = 2 | 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' 3 | let customAlphabet = (alphabet, defaultSize = 21) => { 4 | return (size = defaultSize) => { 5 | let id = '' 6 | let i = size 7 | while (i--) { 8 | id += alphabet[(Math.random() * alphabet.length) | 0] 9 | } 10 | return id 11 | } 12 | } 13 | let nanoid = (size = 21) => { 14 | let id = '' 15 | let i = size 16 | while (i--) { 17 | id += urlAlphabet[(Math.random() * 64) | 0] 18 | } 19 | return id 20 | } 21 | module.exports = { nanoid, customAlphabet } 22 | -------------------------------------------------------------------------------- /trl/examples/accelerate_configs/deepspeed_zero2.yaml: -------------------------------------------------------------------------------- 1 | compute_environment: LOCAL_MACHINE 2 | debug: false 3 | deepspeed_config: 4 | deepspeed_multinode_launcher: standard 5 | gradient_accumulation_steps: 1 6 | offload_optimizer_device: none 7 | offload_param_device: none 8 | zero3_init_flag: false 9 | zero_stage: 2 10 | distributed_type: DEEPSPEED 11 | downcast_bf16: 'no' 12 | machine_rank: 0 13 | main_training_function: main 14 | mixed_precision: 'bf16' 15 | num_machines: 1 16 | num_processes: 8 17 | rdzv_backend: static 18 | same_network: true 19 | tpu_env: [] 20 | tpu_use_cluster: false 21 | tpu_use_sudo: false 22 | use_cpu: false 23 | -------------------------------------------------------------------------------- /alignment-handbook/chat-frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/hasown/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [ljharb] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: npm/hasown 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with a single custom sponsorship URL 13 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/reusify/reusify.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | function reusify (Constructor) { 4 | var head = new Constructor() 5 | var tail = head 6 | 7 | function get () { 8 | var current = head 9 | 10 | if (current.next) { 11 | head = current.next 12 | } else { 13 | head = new Constructor() 14 | tail = head 15 | } 16 | 17 | current.next = null 18 | 19 | return current 20 | } 21 | 22 | function release (obj) { 23 | tail.next = obj 24 | tail = obj 25 | } 26 | 27 | return { 28 | get: get, 29 | release: release 30 | } 31 | } 32 | 33 | module.exports = reusify 34 | -------------------------------------------------------------------------------- /alignment-handbook/.github/workflows/build_pr_documentation.yml: -------------------------------------------------------------------------------- 1 | name: Build PR Documentation 2 | 3 | on: 4 | pull_request: 5 | 6 | concurrency: 7 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} 8 | cancel-in-progress: true 9 | 10 | jobs: 11 | build: 12 | uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@main 13 | with: 14 | commit_sha: ${{ github.event.pull_request.head.sha }} 15 | pr_number: ${{ github.event.number }} 16 | package: alignment-handbook 17 | path_to_docs: alignment-handbook/chapters/ 18 | additional_args: --not_python_module 19 | languages: en -------------------------------------------------------------------------------- /alignment-handbook/node_modules/picocolors/picocolors.browser.js: -------------------------------------------------------------------------------- 1 | var x=String; 2 | var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}}; 3 | module.exports=create(); 4 | module.exports.createColors = create; 5 | -------------------------------------------------------------------------------- /alignment-handbook/recipes/accelerate_configs/deepspeed_zero3.yaml: -------------------------------------------------------------------------------- 1 | compute_environment: LOCAL_MACHINE 2 | debug: false 3 | deepspeed_config: 4 | deepspeed_multinode_launcher: standard 5 | offload_optimizer_device: none 6 | offload_param_device: none 7 | zero3_init_flag: true 8 | zero3_save_16bit_model: true 9 | zero_stage: 3 10 | distributed_type: DEEPSPEED 11 | downcast_bf16: 'no' 12 | machine_rank: 0 13 | main_training_function: main 14 | mixed_precision: bf16 15 | num_machines: 1 16 | num_processes: 4 17 | rdzv_backend: static 18 | same_network: true 19 | tpu_env: [] 20 | tpu_use_cluster: false 21 | tpu_use_sudo: false 22 | use_cpu: false 23 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/parseGlob.js: -------------------------------------------------------------------------------- 1 | import globParent from 'glob-parent' 2 | 3 | // Based on `glob-base` 4 | // https://github.com/micromatch/glob-base/blob/master/index.js 5 | export function parseGlob(pattern) { 6 | let glob = pattern 7 | let base = globParent(pattern) 8 | 9 | if (base !== '.') { 10 | glob = pattern.substr(base.length) 11 | if (glob.charAt(0) === '/') { 12 | glob = glob.substr(1) 13 | } 14 | } 15 | 16 | if (glob.substr(0, 2) === './') { 17 | glob = glob.substr(2) 18 | } else if (glob.charAt(0) === '/') { 19 | glob = glob.substr(1) 20 | } 21 | 22 | return { base, glob } 23 | } 24 | -------------------------------------------------------------------------------- /trl/examples/research_projects/README.md: -------------------------------------------------------------------------------- 1 | # Research projects that use TRL 2 | 3 | Welcome to the research projects folder! Here you can find the scripts used for some research projects that used TRL and maintained by the developers and the community (LM de-toxification, Stack-Llama, etc.). Check out the READMEs in the subfolders for more information! 4 | 5 | - [De-detoxifying language models](https://github.com/huggingface/trl/tree/main/examples/research_projects/toxicity) 6 | - [Stack-Llama](https://github.com/huggingface/trl/tree/main/examples/research_projects/stack_llama) 7 | - [Stack-Llama-2](https://github.com/huggingface/trl/tree/main/examples/research_projects/stack_llama_2) -------------------------------------------------------------------------------- /alignment-handbook/node_modules/any-promise/register-shim.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | module.exports = require('./loader')(window, loadImplementation) 3 | 4 | /** 5 | * Browser specific loadImplementation. Always uses `window.Promise` 6 | * 7 | * To register a custom implementation, must register with `Promise` option. 8 | */ 9 | function loadImplementation(){ 10 | if(typeof window.Promise === 'undefined'){ 11 | throw new Error("any-promise browser requires a polyfill or explicit registration"+ 12 | " e.g: require('any-promise/register/bluebird')") 13 | } 14 | return { 15 | Promise: window.Promise, 16 | implementation: 'window.Promise' 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [ljharb] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: npm/resolve 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.scandir/out/types/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import type * as fs from 'fs'; 3 | export interface Entry { 4 | dirent: Dirent; 5 | name: string; 6 | path: string; 7 | stats?: Stats; 8 | } 9 | export declare type Stats = fs.Stats; 10 | export declare type ErrnoException = NodeJS.ErrnoException; 11 | export interface Dirent { 12 | isBlockDevice: () => boolean; 13 | isCharacterDevice: () => boolean; 14 | isDirectory: () => boolean; 15 | isFIFO: () => boolean; 16 | isFile: () => boolean; 17 | isSocket: () => boolean; 18 | isSymbolicLink: () => boolean; 19 | name: string; 20 | } 21 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/readers/stream.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { Readable } from 'stream'; 3 | import * as fsStat from '@nodelib/fs.stat'; 4 | import * as fsWalk from '@nodelib/fs.walk'; 5 | import { Pattern, ReaderOptions } from '../types'; 6 | import Reader from './reader'; 7 | export default class ReaderStream extends Reader { 8 | protected _walkStream: typeof fsWalk.walkStream; 9 | protected _stat: typeof fsStat.stat; 10 | dynamic(root: string, options: ReaderOptions): Readable; 11 | static(patterns: Pattern[], options: ReaderOptions): Readable; 12 | private _getEntry; 13 | private _getStat; 14 | } 15 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/is-fullwidth-code-point/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms). 3 | 4 | @param codePoint - The [code point](https://en.wikipedia.org/wiki/Code_point) of a character. 5 | 6 | @example 7 | ``` 8 | import isFullwidthCodePoint from 'is-fullwidth-code-point'; 9 | 10 | isFullwidthCodePoint('谢'.codePointAt(0)); 11 | //=> true 12 | 13 | isFullwidthCodePoint('a'.codePointAt(0)); 14 | //=> false 15 | ``` 16 | */ 17 | export default function isFullwidthCodePoint(codePoint: number): boolean; 18 | -------------------------------------------------------------------------------- /trl/examples/accelerate_configs/deepspeed_zero3.yaml: -------------------------------------------------------------------------------- 1 | compute_environment: LOCAL_MACHINE 2 | debug: false 3 | deepspeed_config: 4 | deepspeed_multinode_launcher: standard 5 | gradient_accumulation_steps: 1 6 | offload_optimizer_device: none 7 | offload_param_device: none 8 | zero3_init_flag: true 9 | zero3_save_16bit_model: true 10 | zero_stage: 3 11 | distributed_type: DEEPSPEED 12 | downcast_bf16: 'no' 13 | machine_rank: 0 14 | main_training_function: main 15 | mixed_precision: 'bf16' 16 | num_machines: 1 17 | num_processes: 8 18 | rdzv_backend: static 19 | same_network: true 20 | tpu_env: [] 21 | tpu_use_cluster: false 22 | tpu_use_sudo: false 23 | use_cpu: false 24 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/didyoumean/LICENSE: -------------------------------------------------------------------------------- 1 | ## License 2 | 3 | didYouMean.js copyright (c) 2013 Dave Porter. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License 8 | [here](http://www.apache.org/licenses/LICENSE-2.0). 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/function-bind/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [ljharb] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: npm/function-bind 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/.bin/autoprefixer: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | let mode = process.argv[2] 4 | if (mode === '--info') { 5 | process.stdout.write(require('../')().info() + '\n') 6 | } else if (mode === '--version') { 7 | process.stdout.write( 8 | 'autoprefixer ' + require('../package.json').version + '\n' 9 | ) 10 | } else { 11 | process.stdout.write( 12 | 'autoprefix\n' + 13 | '\n' + 14 | 'Options:\n' + 15 | ' --info Show target browsers and used prefixes\n' + 16 | ' --version Show version number\n' + 17 | ' --help Show help\n' + 18 | '\n' + 19 | 'Usage:\n' + 20 | ' autoprefixer --info\n' 21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/shebang-command/readme.md: -------------------------------------------------------------------------------- 1 | # shebang-command [![Build Status](https://travis-ci.org/kevva/shebang-command.svg?branch=master)](https://travis-ci.org/kevva/shebang-command) 2 | 3 | > Get the command from a shebang 4 | 5 | 6 | ## Install 7 | 8 | ``` 9 | $ npm install shebang-command 10 | ``` 11 | 12 | 13 | ## Usage 14 | 15 | ```js 16 | const shebangCommand = require('shebang-command'); 17 | 18 | shebangCommand('#!/usr/bin/env node'); 19 | //=> 'node' 20 | 21 | shebangCommand('#!/bin/bash'); 22 | //=> 'bash' 23 | ``` 24 | 25 | 26 | ## API 27 | 28 | ### shebangCommand(string) 29 | 30 | #### string 31 | 32 | Type: `string` 33 | 34 | String containing a shebang. 35 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/autoprefixer/bin/autoprefixer: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | let mode = process.argv[2] 4 | if (mode === '--info') { 5 | process.stdout.write(require('../')().info() + '\n') 6 | } else if (mode === '--version') { 7 | process.stdout.write( 8 | 'autoprefixer ' + require('../package.json').version + '\n' 9 | ) 10 | } else { 11 | process.stdout.write( 12 | 'autoprefix\n' + 13 | '\n' + 14 | 'Options:\n' + 15 | ' --info Show target browsers and used prefixes\n' + 16 | ' --version Show version number\n' + 17 | ' --help Show help\n' + 18 | '\n' + 19 | 'Usage:\n' + 20 | ' autoprefixer --info\n' 21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/binary-extensions/readme.md: -------------------------------------------------------------------------------- 1 | # binary-extensions 2 | 3 | > List of binary file extensions 4 | 5 | The list is just a [JSON file](binary-extensions.json) and can be used anywhere. 6 | 7 | ## Install 8 | 9 | ```sh 10 | npm install binary-extensions 11 | ``` 12 | 13 | ## Usage 14 | 15 | ```js 16 | const binaryExtensions = require('binary-extensions'); 17 | 18 | console.log(binaryExtensions); 19 | //=> ['3ds', '3g2', …] 20 | ``` 21 | 22 | ## Related 23 | 24 | - [is-binary-path](https://github.com/sindresorhus/is-binary-path) - Check if a filepath is a binary file 25 | - [text-extensions](https://github.com/sindresorhus/text-extensions) - List of text file extensions 26 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/picocolors/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "picocolors", 3 | "version": "1.1.1", 4 | "main": "./picocolors.js", 5 | "types": "./picocolors.d.ts", 6 | "browser": { 7 | "./picocolors.js": "./picocolors.browser.js" 8 | }, 9 | "sideEffects": false, 10 | "description": "The tiniest and the fastest library for terminal output formatting with ANSI colors", 11 | "files": [ 12 | "picocolors.*", 13 | "types.d.ts" 14 | ], 15 | "keywords": [ 16 | "terminal", 17 | "colors", 18 | "formatting", 19 | "cli", 20 | "console" 21 | ], 22 | "author": "Alexey Raspopov", 23 | "repository": "alexeyraspopov/picocolors", 24 | "license": "ISC" 25 | } 26 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.stat/out/adapters/fs.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; 4 | const fs = require("fs"); 5 | exports.FILE_SYSTEM_ADAPTER = { 6 | lstat: fs.lstat, 7 | stat: fs.stat, 8 | lstatSync: fs.lstatSync, 9 | statSync: fs.statSync 10 | }; 11 | function createFileSystemAdapter(fsMethods) { 12 | if (fsMethods === undefined) { 13 | return exports.FILE_SYSTEM_ADAPTER; 14 | } 15 | return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); 16 | } 17 | exports.createFileSystemAdapter = createFileSystemAdapter; 18 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/camelcase-css/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | const pattern = /-(\w|$)/g; 3 | 4 | const callback = (dashChar, char) => char.toUpperCase(); 5 | 6 | 7 | 8 | const camelCaseCSS = property => 9 | { 10 | property = property.toLowerCase(); 11 | 12 | // NOTE :: IE8's "styleFloat" is intentionally not supported 13 | if (property === "float") 14 | { 15 | return "cssFloat"; 16 | } 17 | // Microsoft vendor-prefixes are uniquely cased 18 | else if (property.startsWith("-ms-")) 19 | { 20 | return property.substr(1).replace(pattern, callback); 21 | } 22 | else 23 | { 24 | return property.replace(pattern, callback); 25 | } 26 | }; 27 | 28 | 29 | 30 | module.exports = camelCaseCSS; 31 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/utils/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0; 4 | const array = require("./array"); 5 | exports.array = array; 6 | const errno = require("./errno"); 7 | exports.errno = errno; 8 | const fs = require("./fs"); 9 | exports.fs = fs; 10 | const path = require("./path"); 11 | exports.path = path; 12 | const pattern = require("./pattern"); 13 | exports.pattern = pattern; 14 | const stream = require("./stream"); 15 | exports.stream = stream; 16 | const string = require("./string"); 17 | exports.string = string; 18 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/buildMediaQuery.js: -------------------------------------------------------------------------------- 1 | export default function buildMediaQuery(screens) { 2 | screens = Array.isArray(screens) ? screens : [screens] 3 | 4 | return screens 5 | .map((screen) => { 6 | let values = screen.values.map((screen) => { 7 | if (screen.raw !== undefined) { 8 | return screen.raw 9 | } 10 | 11 | return [ 12 | screen.min && `(min-width: ${screen.min})`, 13 | screen.max && `(max-width: ${screen.max})`, 14 | ] 15 | .filter(Boolean) 16 | .join(' and ') 17 | }) 18 | 19 | return screen.not ? `not all and ${values}` : values 20 | }) 21 | .join(', ') 22 | } 23 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [ljharb] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: npm/supports-preserve-symlink-flag 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // This example is used in the documentation. 4 | 5 | // 1. const { parseArgs } = require('node:util'); // from node 6 | // 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package 7 | const { parseArgs } = require('..'); // in repo 8 | 9 | const args = ['-f', '--bar', 'b']; 10 | const options = { 11 | foo: { 12 | type: 'boolean', 13 | short: 'f' 14 | }, 15 | bar: { 16 | type: 'string' 17 | } 18 | }; 19 | const { 20 | values, 21 | positionals 22 | } = parseArgs({ args, options }); 23 | console.log(values, positionals); 24 | 25 | // Try the following: 26 | // node simple-hard-coded.js 27 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js: -------------------------------------------------------------------------------- 1 | var a = require.resolve('buffer/').replace(process.cwd(), '$CWD'); 2 | var b = require('resolve').sync('buffer/', { preserveSymlinks: true }).replace(process.cwd(), '$CWD'); 3 | var c = require('resolve').sync('buffer/', { preserveSymlinks: false }).replace(process.cwd(), '$CWD'); 4 | 5 | console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false')); 6 | console.log(b, ': preserveSymlinks true'); 7 | console.log(c, ': preserveSymlinks false'); 8 | 9 | if (a !== b && a !== c) { 10 | throw 'sync: no match'; 11 | } 12 | console.log('sync: success! a matched either b or c\n'); 13 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/scripts/type-utils.js: -------------------------------------------------------------------------------- 1 | export function union(types) { 2 | return [...new Set(types)].join(' | ') 3 | } 4 | 5 | export function unionValues(values) { 6 | return union(values.map(forValue)) 7 | } 8 | 9 | export function forKeys(value) { 10 | return union(Object.keys(value).map((key) => `'${key}'`)) 11 | } 12 | 13 | export function forValue(value) { 14 | if (Array.isArray(value)) { 15 | return `(${unionValues(value)})[]` 16 | } 17 | 18 | if (typeof value === 'object') { 19 | return `Record<${forKeys(value)}, ${unionValues(Object.values(value))}>` 20 | } 21 | 22 | if (typeof value === 'string') { 23 | return `string` 24 | } 25 | 26 | return `any` 27 | } 28 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/lines-and-columns/README.md: -------------------------------------------------------------------------------- 1 | # lines-and-columns 2 | 3 | Maps lines and columns to character offsets and back. This is useful for parsers 4 | and other text processors that deal in character ranges but process text with 5 | meaningful lines and columns. 6 | 7 | ## Install 8 | 9 | ``` 10 | $ npm install [--save] lines-and-columns 11 | ``` 12 | 13 | ## Usage 14 | 15 | ```js 16 | import { LinesAndColumns } from 'lines-and-columns' 17 | 18 | const lines = new LinesAndColumns( 19 | `table { 20 | border: 0 21 | }` 22 | ) 23 | 24 | lines.locationForIndex(9) 25 | // { line: 1, column: 1 } 26 | 27 | lines.indexForLocation({ line: 1, column: 2 }) 28 | // 10 29 | ``` 30 | 31 | ## License 32 | 33 | MIT 34 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/.bin/sucrase-node: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | const Module = require("module"); 3 | const {resolve} = require("path"); 4 | 5 | /* 6 | * Simple wrapper around node that first registers Sucrase with default settings. 7 | * 8 | * This is meant for simple use cases, and doesn't support custom Node/V8 args, 9 | * executing a code snippet, a REPL, or other things that you might find in 10 | * node, babel-node, or ts-node. For more advanced use cases, you can use 11 | * `node -r sucrase/register` or register a require hook programmatically from 12 | * your own code. 13 | */ 14 | require("../register"); 15 | 16 | process.argv.splice(1, 1); 17 | process.argv[1] = resolve(process.argv[1]); 18 | Module.runMain(); 19 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/configurePlugins.js: -------------------------------------------------------------------------------- 1 | export default function (pluginConfig, plugins) { 2 | if (pluginConfig === undefined) { 3 | return plugins 4 | } 5 | 6 | const pluginNames = Array.isArray(pluginConfig) 7 | ? pluginConfig 8 | : [ 9 | ...new Set( 10 | plugins 11 | .filter((pluginName) => { 12 | return pluginConfig !== false && pluginConfig[pluginName] !== false 13 | }) 14 | .concat( 15 | Object.keys(pluginConfig).filter((pluginName) => { 16 | return pluginConfig[pluginName] !== false 17 | }) 18 | ) 19 | ), 20 | ] 21 | 22 | return pluginNames 23 | } 24 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/sucrase/bin/sucrase-node: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | const Module = require("module"); 3 | const {resolve} = require("path"); 4 | 5 | /* 6 | * Simple wrapper around node that first registers Sucrase with default settings. 7 | * 8 | * This is meant for simple use cases, and doesn't support custom Node/V8 args, 9 | * executing a code snippet, a REPL, or other things that you might find in 10 | * node, babel-node, or ts-node. For more advanced use cases, you can use 11 | * `node -r sucrase/register` or register a require hook programmatically from 12 | * your own code. 13 | */ 14 | require("../register"); 15 | 16 | process.argv.splice(1, 1); 17 | process.argv[1] = resolve(process.argv[1]); 18 | Module.runMain(); 19 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/arg/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "arg", 3 | "version": "5.0.2", 4 | "description": "Unopinionated, no-frills CLI argument parser", 5 | "main": "index.js", 6 | "types": "index.d.ts", 7 | "repository": "vercel/arg", 8 | "author": "Josh Junon ", 9 | "license": "MIT", 10 | "files": [ 11 | "index.js", 12 | "index.d.ts" 13 | ], 14 | "scripts": { 15 | "test": "WARN_EXIT=1 jest --coverage -w 2" 16 | }, 17 | "devDependencies": { 18 | "chai": "^4.1.1", 19 | "jest": "^27.0.6", 20 | "prettier": "^2.3.2" 21 | }, 22 | "prettier": { 23 | "arrowParens": "always", 24 | "singleQuote": true, 25 | "tabWidth": 2, 26 | "trailingComma": "none" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/utils/stream.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.merge = void 0; 4 | const merge2 = require("merge2"); 5 | function merge(streams) { 6 | const mergedStream = merge2(streams); 7 | streams.forEach((stream) => { 8 | stream.once('error', (error) => mergedStream.emit('error', error)); 9 | }); 10 | mergedStream.once('close', () => propagateCloseEventToSources(streams)); 11 | mergedStream.once('end', () => propagateCloseEventToSources(streams)); 12 | return mergedStream; 13 | } 14 | exports.merge = merge; 15 | function propagateCloseEventToSources(streams) { 16 | streams.forEach((stream) => stream.emit('close')); 17 | } 18 | -------------------------------------------------------------------------------- /trl/trl/extras/__init__.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | 3 | # Copyright 2022 The HuggingFace Team. All rights reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | from .best_of_n_sampler import BestOfNSampler 17 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/utils/array.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.splitWhen = exports.flatten = void 0; 4 | function flatten(items) { 5 | return items.reduce((collection, item) => [].concat(collection, item), []); 6 | } 7 | exports.flatten = flatten; 8 | function splitWhen(items, predicate) { 9 | const result = [[]]; 10 | let groupIndex = 0; 11 | for (const item of items) { 12 | if (predicate(item)) { 13 | groupIndex++; 14 | result[groupIndex] = []; 15 | } 16 | else { 17 | result[groupIndex].push(item); 18 | } 19 | } 20 | return result; 21 | } 22 | exports.splitWhen = splitWhen; 23 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/picocolors/README.md: -------------------------------------------------------------------------------- 1 | # picocolors 2 | 3 | The tiniest and the fastest library for terminal output formatting with ANSI colors. 4 | 5 | ```javascript 6 | import pc from "picocolors" 7 | 8 | console.log( 9 | pc.green(`How are ${pc.italic(`you`)} doing?`) 10 | ) 11 | ``` 12 | 13 | - **No dependencies.** 14 | - **14 times** smaller and **2 times** faster than chalk. 15 | - Used by popular tools like PostCSS, SVGO, Stylelint, and Browserslist. 16 | - Node.js v6+ & browsers support. Support for both CJS and ESM projects. 17 | - TypeScript type declarations included. 18 | - [`NO_COLOR`](https://no-color.org/) friendly. 19 | 20 | ## Docs 21 | Read **[full docs](https://github.com/alexeyraspopov/picocolors#readme)** on GitHub. 22 | -------------------------------------------------------------------------------- /trl/benchmark/trl.slurm_template: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #SBATCH --job-name=trl 3 | #SBATCH --partition=production-cluster 4 | #SBATCH --gpus-per-task={{gpus_per_task}} 5 | #SBATCH --cpus-per-gpu={{cpus_per_gpu}} 6 | #SBATCH --ntasks={{ntasks}} 7 | #SBATCH --output=slurm/logs/%x_%j.out 8 | #SBATCH --array={{array}} 9 | #SBATCH --exclude=ip-26-0-156-239,ip-26-0-148-151,ip-26-0-146-212,ip-26-0-145-137,ip-26-0-146-249,ip-26-0-146-149,ip-26-0-147-233,ip-26-0-145-154,ip-26-0-144-35,ip-26-0-144-189,ip-26-0-146-183,ip-26-0-147-120,ip-26-0-144-95,ip-26-0-145-193 10 | {{nodes}} 11 | 12 | seeds={{seeds}} 13 | seed=${seeds[$SLURM_ARRAY_TASK_ID % {{len_seeds}}]} 14 | 15 | echo "Running task $SLURM_ARRAY_TASK_ID with seed: $seed" 16 | srun {{command}} --ppo_config.seed $seed 17 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/shebang-command/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shebang-command", 3 | "version": "2.0.0", 4 | "description": "Get the command from a shebang", 5 | "license": "MIT", 6 | "repository": "kevva/shebang-command", 7 | "author": { 8 | "name": "Kevin Mårtensson", 9 | "email": "kevinmartensson@gmail.com", 10 | "url": "github.com/kevva" 11 | }, 12 | "engines": { 13 | "node": ">=8" 14 | }, 15 | "scripts": { 16 | "test": "xo && ava" 17 | }, 18 | "files": [ 19 | "index.js" 20 | ], 21 | "keywords": [ 22 | "cmd", 23 | "command", 24 | "parse", 25 | "shebang" 26 | ], 27 | "dependencies": { 28 | "shebang-regex": "^3.0.0" 29 | }, 30 | "devDependencies": { 31 | "ava": "^2.3.0", 32 | "xo": "^0.24.0" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /alignment-handbook/chat-frontend/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import * as fs from 'fs'; 3 | import type { ErrnoException } from '../types'; 4 | export declare type StatAsynchronousMethod = (path: string, callback: (error: ErrnoException | null, stats: fs.Stats) => void) => void; 5 | export declare type StatSynchronousMethod = (path: string) => fs.Stats; 6 | export interface FileSystemAdapter { 7 | lstat: StatAsynchronousMethod; 8 | stat: StatAsynchronousMethod; 9 | lstatSync: StatSynchronousMethod; 10 | statSync: StatSynchronousMethod; 11 | } 12 | export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter; 13 | export declare function createFileSystemAdapter(fsMethods?: Partial): FileSystemAdapter; 14 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/color-name/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "color-name", 3 | "version": "1.1.4", 4 | "description": "A list of color names and its values", 5 | "main": "index.js", 6 | "files": [ 7 | "index.js" 8 | ], 9 | "scripts": { 10 | "test": "node test.js" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git@github.com:colorjs/color-name.git" 15 | }, 16 | "keywords": [ 17 | "color-name", 18 | "color", 19 | "color-keyword", 20 | "keyword" 21 | ], 22 | "author": "DY ", 23 | "license": "MIT", 24 | "bugs": { 25 | "url": "https://github.com/colorjs/color-name/issues" 26 | }, 27 | "homepage": "https://github.com/colorjs/color-name" 28 | } 29 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.scandir/out/adapters/fs.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; 4 | const fs = require("fs"); 5 | exports.FILE_SYSTEM_ADAPTER = { 6 | lstat: fs.lstat, 7 | stat: fs.stat, 8 | lstatSync: fs.lstatSync, 9 | statSync: fs.statSync, 10 | readdir: fs.readdir, 11 | readdirSync: fs.readdirSync 12 | }; 13 | function createFileSystemAdapter(fsMethods) { 14 | if (fsMethods === undefined) { 15 | return exports.FILE_SYSTEM_ADAPTER; 16 | } 17 | return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); 18 | } 19 | exports.createFileSystemAdapter = createFileSystemAdapter; 20 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.stat/out/providers/sync.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.read = void 0; 4 | function read(path, settings) { 5 | const lstat = settings.fs.lstatSync(path); 6 | if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { 7 | return lstat; 8 | } 9 | try { 10 | const stat = settings.fs.statSync(path); 11 | if (settings.markSymbolicLink) { 12 | stat.isSymbolicLink = () => true; 13 | } 14 | return stat; 15 | } 16 | catch (error) { 17 | if (!settings.throwErrorOnBrokenSymbolicLink) { 18 | return lstat; 19 | } 20 | throw error; 21 | } 22 | } 23 | exports.read = read; 24 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/electron-to-chromium/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2018 Kilian Valkhof 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. 4 | 5 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 6 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/value-parser/index.js: -------------------------------------------------------------------------------- 1 | var parse = require('./parse') 2 | var walk = require('./walk') 3 | var stringify = require('./stringify') 4 | 5 | function ValueParser(value) { 6 | if (this instanceof ValueParser) { 7 | this.nodes = parse(value) 8 | return this 9 | } 10 | return new ValueParser(value) 11 | } 12 | 13 | ValueParser.prototype.toString = function () { 14 | return Array.isArray(this.nodes) ? stringify(this.nodes) : '' 15 | } 16 | 17 | ValueParser.prototype.walk = function (cb, bubble) { 18 | walk(this.nodes, cb, bubble) 19 | return this 20 | } 21 | 22 | ValueParser.unit = require('./unit') 23 | 24 | ValueParser.walk = walk 25 | 26 | ValueParser.stringify = stringify 27 | 28 | module.exports = ValueParser 29 | -------------------------------------------------------------------------------- /alignment-handbook/.github/workflows/quality.yml: -------------------------------------------------------------------------------- 1 | name: Quality 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - v*-release 8 | pull_request: 9 | branches: 10 | - main 11 | 12 | jobs: 13 | 14 | check_code_quality: 15 | name: Check code quality 16 | runs-on: ubuntu-latest 17 | steps: 18 | - name: Checkout code 19 | uses: actions/checkout@v2 20 | - name: Setup Python environment 21 | uses: actions/setup-python@v2 22 | with: 23 | python-version: 3.10.10 24 | - name: Install dependencies 25 | run: | 26 | python -m pip install --upgrade pip 27 | python -m pip install ".[quality]" 28 | - name: Code quality 29 | run: | 30 | make quality 31 | 32 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/providers/filters/entry.d.ts: -------------------------------------------------------------------------------- 1 | import Settings from '../../settings'; 2 | import { EntryFilterFunction, MicromatchOptions, Pattern } from '../../types'; 3 | export default class EntryFilter { 4 | private readonly _settings; 5 | private readonly _micromatchOptions; 6 | readonly index: Map; 7 | constructor(_settings: Settings, _micromatchOptions: MicromatchOptions); 8 | getFilter(positive: Pattern[], negative: Pattern[]): EntryFilterFunction; 9 | private _filter; 10 | private _isDuplicateEntry; 11 | private _createIndexRecord; 12 | private _onlyFileFilter; 13 | private _onlyDirectoryFilter; 14 | private _isSkippedByAbsoluteNegativePatterns; 15 | private _isMatchToPatterns; 16 | } 17 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/providers/filters/deep.d.ts: -------------------------------------------------------------------------------- 1 | import { MicromatchOptions, EntryFilterFunction, Pattern } from '../../types'; 2 | import Settings from '../../settings'; 3 | export default class DeepFilter { 4 | private readonly _settings; 5 | private readonly _micromatchOptions; 6 | constructor(_settings: Settings, _micromatchOptions: MicromatchOptions); 7 | getFilter(basePath: string, positive: Pattern[], negative: Pattern[]): EntryFilterFunction; 8 | private _getMatcher; 9 | private _getNegativePatternsRe; 10 | private _filter; 11 | private _isSkippedByDeep; 12 | private _getEntryLevel; 13 | private _isSkippedSymbolicLink; 14 | private _isSkippedByPositivePatterns; 15 | private _isSkippedByNegativePatterns; 16 | } 17 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/reusify/benchmarks/createNoCodeFunction.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | var fib = require('./fib') 4 | var max = 100000000 5 | var start = Date.now() 6 | 7 | // create a funcion with the typical error 8 | // pattern, that delegates the heavy load 9 | // to something else 10 | function createNoCodeFunction () { 11 | /* eslint no-constant-condition: "off" */ 12 | var num = 100 13 | 14 | ;(function () { 15 | if (null) { 16 | // do nothing 17 | } else { 18 | fib(num) 19 | } 20 | })() 21 | } 22 | 23 | for (var i = 0; i < max; i++) { 24 | createNoCodeFunction() 25 | } 26 | 27 | var time = Date.now() - start 28 | console.log('Total time', time) 29 | console.log('Total iterations', max) 30 | console.log('Iteration/s', max / time * 1000) 31 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/shebang-regex/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shebang-regex", 3 | "version": "3.0.0", 4 | "description": "Regular expression for matching a shebang line", 5 | "license": "MIT", 6 | "repository": "sindresorhus/shebang-regex", 7 | "author": { 8 | "name": "Sindre Sorhus", 9 | "email": "sindresorhus@gmail.com", 10 | "url": "sindresorhus.com" 11 | }, 12 | "engines": { 13 | "node": ">=8" 14 | }, 15 | "scripts": { 16 | "test": "xo && ava && tsd" 17 | }, 18 | "files": [ 19 | "index.js", 20 | "index.d.ts" 21 | ], 22 | "keywords": [ 23 | "regex", 24 | "regexp", 25 | "shebang", 26 | "match", 27 | "test", 28 | "line" 29 | ], 30 | "devDependencies": { 31 | "ava": "^1.4.1", 32 | "tsd": "^0.7.2", 33 | "xo": "^0.24.0" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/test/precedence.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var test = require('tape'); 3 | var resolve = require('../'); 4 | 5 | test('precedence', function (t) { 6 | t.plan(3); 7 | var dir = path.join(__dirname, 'precedence/aaa'); 8 | 9 | resolve('./', { basedir: dir }, function (err, res, pkg) { 10 | t.ifError(err); 11 | t.equal(res, path.join(dir, 'index.js')); 12 | t.equal(pkg.name, 'resolve'); 13 | }); 14 | }); 15 | 16 | test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string 17 | t.plan(1); 18 | var dir = path.join(__dirname, 'precedence/bbb'); 19 | 20 | resolve('./', { basedir: dir }, function (err, res, pkg) { 21 | t.ok(err); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.scandir/out/settings.d.ts: -------------------------------------------------------------------------------- 1 | import * as fsStat from '@nodelib/fs.stat'; 2 | import * as fs from './adapters/fs'; 3 | export interface Options { 4 | followSymbolicLinks?: boolean; 5 | fs?: Partial; 6 | pathSegmentSeparator?: string; 7 | stats?: boolean; 8 | throwErrorOnBrokenSymbolicLink?: boolean; 9 | } 10 | export default class Settings { 11 | private readonly _options; 12 | readonly followSymbolicLinks: boolean; 13 | readonly fs: fs.FileSystemAdapter; 14 | readonly pathSegmentSeparator: string; 15 | readonly stats: boolean; 16 | readonly throwErrorOnBrokenSymbolicLink: boolean; 17 | readonly fsStatSettings: fsStat.Settings; 18 | constructor(_options?: Options); 19 | private _getValue; 20 | } 21 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/didyoumean/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "didyoumean", 3 | "version": "1.2.2", 4 | "description": "Match human-quality input to potential matches by edit distance.", 5 | "homepage": "https://github.com/dcporter/didyoumean.js", 6 | "author": { 7 | "name": "Dave Porter", 8 | "email": "dcporter@gmail.com", 9 | "url": "http://dcporter.net/" 10 | }, 11 | "keywords": [ 12 | "didyoumean", 13 | "mean", 14 | "edit", 15 | "distance", 16 | "levenshtein" 17 | ], 18 | "main": "./didYouMean-1.2.1.js", 19 | "repository": { 20 | "type": "git", 21 | "url": "https://github.com/dcporter/didyoumean.js.git" 22 | }, 23 | "bugs": { 24 | "url": "https://github.com/dcporter/didyoumean.js/issues" 25 | }, 26 | "license": "Apache-2.0" 27 | } 28 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.stat/out/settings.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | const fs = require("./adapters/fs"); 4 | class Settings { 5 | constructor(_options = {}) { 6 | this._options = _options; 7 | this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); 8 | this.fs = fs.createFileSystemAdapter(this._options.fs); 9 | this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); 10 | this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); 11 | } 12 | _getValue(option, value) { 13 | return option !== null && option !== void 0 ? option : value; 14 | } 15 | } 16 | exports.default = Settings; 17 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/resolve/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | max_line_length = 200 11 | 12 | [*.js] 13 | block_comment_start = /* 14 | block_comment = * 15 | block_comment_end = */ 16 | 17 | [*.yml] 18 | indent_size = 1 19 | 20 | [package.json] 21 | indent_style = tab 22 | 23 | [lib/core.json] 24 | indent_style = tab 25 | 26 | [CHANGELOG.md] 27 | indent_style = space 28 | indent_size = 2 29 | 30 | [{*.json,Makefile}] 31 | max_line_length = off 32 | 33 | [test/{dotdot,resolver,module_dir,multirepo,node_path,pathfilter,precedence}/**/*] 34 | indent_style = off 35 | indent_size = off 36 | max_line_length = off 37 | insert_final_newline = off 38 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/scripts/release-notes.js: -------------------------------------------------------------------------------- 1 | // Given a version, figure out what the release notes are so that we can use this to pre-fill the 2 | // relase notes on a GitHub release for the current version. 3 | 4 | let path = require('path') 5 | let fs = require('fs') 6 | 7 | let version = 8 | process.argv[2] || process.env.npm_package_version || require('../package.json').version 9 | 10 | let changelog = fs.readFileSync(path.resolve(__dirname, '..', 'CHANGELOG.md'), 'utf8') 11 | let match = new RegExp( 12 | `## \\[${version}\\] - (.*)\\n\\n([\\s\\S]*?)\\n(?:(?:##\\s)|(?:\\[))`, 13 | 'g' 14 | ).exec(changelog) 15 | 16 | if (match) { 17 | let [, , notes] = match 18 | console.log(notes.trim()) 19 | } else { 20 | console.log(`Placeholder release notes for version: v${version}`) 21 | } 22 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/yaml/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Eemeli Aro 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any purpose 4 | with or without fee is hereby granted, provided that the above copyright notice 5 | and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 8 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 9 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 10 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 11 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 12 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 13 | THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/camelcase-css/index-es5.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var pattern = /-(\w|$)/g; 4 | 5 | var callback = function callback(dashChar, char) { 6 | return char.toUpperCase(); 7 | }; 8 | 9 | var camelCaseCSS = function camelCaseCSS(property) { 10 | property = property.toLowerCase(); 11 | 12 | // NOTE :: IE8's "styleFloat" is intentionally not supported 13 | if (property === "float") { 14 | return "cssFloat"; 15 | } 16 | // Microsoft vendor-prefixes are uniquely cased 17 | else if (property.charCodeAt(0) === 45&& property.charCodeAt(1) === 109&& property.charCodeAt(2) === 115&& property.charCodeAt(3) === 45) { 18 | return property.substr(1).replace(pattern, callback); 19 | } else { 20 | return property.replace(pattern, callback); 21 | } 22 | }; 23 | 24 | module.exports = camelCaseCSS; 25 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/nameClass.js: -------------------------------------------------------------------------------- 1 | import escapeClassName from './escapeClassName' 2 | import escapeCommas from './escapeCommas' 3 | 4 | export function asClass(name) { 5 | return escapeCommas(`.${escapeClassName(name)}`) 6 | } 7 | 8 | export default function nameClass(classPrefix, key) { 9 | return asClass(formatClass(classPrefix, key)) 10 | } 11 | 12 | export function formatClass(classPrefix, key) { 13 | if (key === 'DEFAULT') { 14 | return classPrefix 15 | } 16 | 17 | if (key === '-' || key === '-DEFAULT') { 18 | return `-${classPrefix}` 19 | } 20 | 21 | if (key.startsWith('-')) { 22 | return `-${classPrefix}${key}` 23 | } 24 | 25 | if (key.startsWith('/')) { 26 | return `${classPrefix}${key}` 27 | } 28 | 29 | return `${classPrefix}-${key}` 30 | } 31 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/removeAlphaVariables.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This function removes any uses of CSS variables used as an alpha channel 3 | * 4 | * This is required for selectors like `:visited` which do not allow 5 | * changes in opacity or external control using CSS variables. 6 | * 7 | * @param {import('postcss').Container} container 8 | * @param {string[]} toRemove 9 | */ 10 | export function removeAlphaVariables(container, toRemove) { 11 | container.walkDecls((decl) => { 12 | if (toRemove.includes(decl.prop)) { 13 | decl.remove() 14 | 15 | return 16 | } 17 | 18 | for (let varName of toRemove) { 19 | if (decl.value.includes(`/ var(${varName})`)) { 20 | decl.value = decl.value.replace(`/ var(${varName})`, '') 21 | } 22 | } 23 | }) 24 | } 25 | -------------------------------------------------------------------------------- /alignment-handbook/.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: Tests 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - v*-release 8 | pull_request: 9 | branches: 10 | - main 11 | 12 | jobs: 13 | 14 | unit-tests: 15 | name: Run unit tests 16 | env: 17 | HF_TOKEN: ${{ secrets.HF_TOKEN }} 18 | runs-on: ubuntu-latest 19 | steps: 20 | - name: Checkout code 21 | uses: actions/checkout@v2 22 | - name: Setup Python environment 23 | uses: actions/setup-python@v2 24 | with: 25 | python-version: 3.10.10 26 | - name: Install dependencies 27 | run: | 28 | python -m pip install --upgrade pip 29 | python -m pip install ".[dev, torch]" 30 | - name: Run unit tests 31 | run: HF_TOKEN=$HF_TOKEN pytest -sv tests/ -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/readers/reader.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import * as fs from 'fs'; 3 | import * as fsStat from '@nodelib/fs.stat'; 4 | import Settings from '../settings'; 5 | import { Entry, ErrnoException, Pattern, ReaderOptions } from '../types'; 6 | export default abstract class Reader { 7 | protected readonly _settings: Settings; 8 | protected readonly _fsStatSettings: fsStat.Settings; 9 | constructor(_settings: Settings); 10 | abstract dynamic(root: string, options: ReaderOptions): T; 11 | abstract static(patterns: Pattern[], options: ReaderOptions): T; 12 | protected _getFullEntryPath(filepath: string): string; 13 | protected _makeEntry(stats: fs.Stats, pattern: Pattern): Entry; 14 | protected _isFatalError(error: ErrnoException): boolean; 15 | } 16 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@isaacs/cliui/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Contributors 2 | 3 | Permission to use, copy, modify, and/or distribute this software 4 | for any purpose with or without fee is hereby granted, provided 5 | that the above copyright notice and this permission notice 6 | appear in all copies. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES 10 | OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE 11 | LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES 12 | OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 13 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 14 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/utils/path.d.ts: -------------------------------------------------------------------------------- 1 | import { Pattern } from '../types'; 2 | /** 3 | * Designed to work only with simple paths: `dir\\file`. 4 | */ 5 | export declare function unixify(filepath: string): string; 6 | export declare function makeAbsolute(cwd: string, filepath: string): string; 7 | export declare function removeLeadingDotSegment(entry: string): string; 8 | export declare const escape: typeof escapeWindowsPath; 9 | export declare function escapeWindowsPath(pattern: Pattern): Pattern; 10 | export declare function escapePosixPath(pattern: Pattern): Pattern; 11 | export declare const convertPathToPattern: typeof convertWindowsPathToPattern; 12 | export declare function convertWindowsPathToPattern(filepath: string): Pattern; 13 | export declare function convertPosixPathToPattern(filepath: string): Pattern; 14 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/shebang-regex/readme.md: -------------------------------------------------------------------------------- 1 | # shebang-regex [![Build Status](https://travis-ci.org/sindresorhus/shebang-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/shebang-regex) 2 | 3 | > Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) line 4 | 5 | 6 | ## Install 7 | 8 | ``` 9 | $ npm install shebang-regex 10 | ``` 11 | 12 | 13 | ## Usage 14 | 15 | ```js 16 | const shebangRegex = require('shebang-regex'); 17 | 18 | const string = '#!/usr/bin/env node\nconsole.log("unicorns");'; 19 | 20 | shebangRegex.test(string); 21 | //=> true 22 | 23 | shebangRegex.exec(string)[0]; 24 | //=> '#!/usr/bin/env node' 25 | 26 | shebangRegex.exec(string)[1]; 27 | //=> '/usr/bin/env node' 28 | ``` 29 | 30 | 31 | ## License 32 | 33 | MIT © [Sindre Sorhus](https://sindresorhus.com) 34 | -------------------------------------------------------------------------------- /trl/examples/notebooks/README.md: -------------------------------------------------------------------------------- 1 | # Notebooks 2 | 3 | This directory contains a collection of Jupyter notebooks that demonstrate how to use the TRL library in different applications. 4 | 5 | - [`best_of_n.ipynb`](https://github.com/huggingface/trl/tree/main/examples/notebooks/best_of_n.ipynb): This notebook demonstrates how to use the "Best of N" sampling strategy using TRL when fine-tuning your model with PPO. 6 | - [`gpt2-sentiment.ipynb`](https://github.com/huggingface/trl/tree/main/examples/notebooks/gpt2-sentiment.ipynb): This notebook demonstrates how to reproduce the GPT2 imdb sentiment tuning example on a jupyter notebook. 7 | - [`gpt2-control.ipynb`](https://github.com/huggingface/trl/tree/main/examples/notebooks/gpt2-sentiment-control.ipynb): This notebook demonstrates how to reproduce the GPT2 sentiment control example on a jupyter notebook. 8 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fastq/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015-2020, Matteo Collina 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/postcss-js/README.md: -------------------------------------------------------------------------------- 1 | # PostCSS JS 2 | 3 | 6 | 7 | [PostCSS] for CSS-in-JS and styles in JS objects. 8 | 9 | For example, to use [Stylelint] or [RTLCSS] plugins in your workflow. 10 | 11 | 12 | Sponsored by Evil Martians 14 | 15 | 16 | [Stylelint]: https://github.com/stylelint/stylelint 17 | [PostCSS]: https://github.com/postcss/postcss 18 | [RTLCSS]: https://github.com/MohammadYounes/rtlcss 19 | 20 | 21 | ## Docs 22 | Read full docs **[here](https://github.com/postcss/postcss-js#readme)**. 23 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/isexe/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/path-parse/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "path-parse", 3 | "version": "1.0.7", 4 | "description": "Node.js path.parse() ponyfill", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "node test.js" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/jbgutierrez/path-parse.git" 12 | }, 13 | "keywords": [ 14 | "path", 15 | "paths", 16 | "file", 17 | "dir", 18 | "parse", 19 | "built-in", 20 | "util", 21 | "utils", 22 | "core", 23 | "ponyfill", 24 | "polyfill", 25 | "shim" 26 | ], 27 | "author": "Javier Blanco ", 28 | "license": "MIT", 29 | "bugs": { 30 | "url": "https://github.com/jbgutierrez/path-parse/issues" 31 | }, 32 | "homepage": "https://github.com/jbgutierrez/path-parse#readme" 33 | } 34 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/which/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/update-browserslist-db/README.md: -------------------------------------------------------------------------------- 1 | # Update Browserslist DB 2 | 3 | Browserslist logo by Anton Popov 5 | 6 | CLI tool to update `caniuse-lite` with browsers DB 7 | from [Browserslist](https://github.com/browserslist/browserslist/) config. 8 | 9 | Some queries like `last 2 versions` or `>1%` depend on actual data 10 | from `caniuse-lite`. 11 | 12 | ```sh 13 | npx update-browserslist-db@latest 14 | ``` 15 | 16 | 17 | Sponsored by Evil Martians 19 | 20 | 21 | ## Docs 22 | Read full docs **[here](https://github.com/browserslist/update-db#readme)**. 23 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/util-deprecate/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "util-deprecate", 3 | "version": "1.0.2", 4 | "description": "The Node.js `util.deprecate()` function with browser support", 5 | "main": "node.js", 6 | "browser": "browser.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git://github.com/TooTallNate/util-deprecate.git" 13 | }, 14 | "keywords": [ 15 | "util", 16 | "deprecate", 17 | "browserify", 18 | "browser", 19 | "node" 20 | ], 21 | "author": "Nathan Rajlich (http://n8.io/)", 22 | "license": "MIT", 23 | "bugs": { 24 | "url": "https://github.com/TooTallNate/util-deprecate/issues" 25 | }, 26 | "homepage": "https://github.com/TooTallNate/util-deprecate" 27 | } 28 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/glob/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) 2009-2023 Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/chokidar/node_modules/glob-parent/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) 2015, 2019 Elan Shanker 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/node_modules/glob-parent/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) 2015, 2019 Elan Shanker 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/lru-cache/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) 2010-2023 Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/minimatch/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/path-key/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "path-key", 3 | "version": "3.1.1", 4 | "description": "Get the PATH environment variable key cross-platform", 5 | "license": "MIT", 6 | "repository": "sindresorhus/path-key", 7 | "author": { 8 | "name": "Sindre Sorhus", 9 | "email": "sindresorhus@gmail.com", 10 | "url": "sindresorhus.com" 11 | }, 12 | "engines": { 13 | "node": ">=8" 14 | }, 15 | "scripts": { 16 | "test": "xo && ava && tsd" 17 | }, 18 | "files": [ 19 | "index.js", 20 | "index.d.ts" 21 | ], 22 | "keywords": [ 23 | "path", 24 | "key", 25 | "environment", 26 | "env", 27 | "variable", 28 | "var", 29 | "get", 30 | "cross-platform", 31 | "windows" 32 | ], 33 | "devDependencies": { 34 | "@types/node": "^11.13.0", 35 | "ava": "^1.4.1", 36 | "tsd": "^0.7.2", 37 | "xo": "^0.24.0" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/update-browserslist-db/utils.js: -------------------------------------------------------------------------------- 1 | const { EOL } = require('os') 2 | 3 | const getFirstRegexpMatchOrDefault = (text, regexp, defaultValue) => { 4 | regexp.lastIndex = 0 // https://stackoverflow.com/a/11477448/4536543 5 | let match = regexp.exec(text) 6 | if (match !== null) { 7 | return match[1] 8 | } else { 9 | return defaultValue 10 | } 11 | } 12 | 13 | const DEFAULT_INDENT = ' ' 14 | const INDENT_REGEXP = /^([ \t]+)[^\s]/m 15 | 16 | module.exports.detectIndent = text => 17 | getFirstRegexpMatchOrDefault(text, INDENT_REGEXP, DEFAULT_INDENT) 18 | module.exports.DEFAULT_INDENT = DEFAULT_INDENT 19 | 20 | const DEFAULT_EOL = EOL 21 | const EOL_REGEXP = /(\r\n|\n|\r)/g 22 | 23 | module.exports.detectEOL = text => 24 | getFirstRegexpMatchOrDefault(text, EOL_REGEXP, DEFAULT_EOL) 25 | module.exports.DEFAULT_EOL = DEFAULT_EOL 26 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/ansi-regex/index.d.ts: -------------------------------------------------------------------------------- 1 | export type Options = { 2 | /** 3 | Match only the first ANSI escape. 4 | 5 | @default false 6 | */ 7 | readonly onlyFirst: boolean; 8 | }; 9 | 10 | /** 11 | Regular expression for matching ANSI escape codes. 12 | 13 | @example 14 | ``` 15 | import ansiRegex from 'ansi-regex'; 16 | 17 | ansiRegex().test('\u001B[4mcake\u001B[0m'); 18 | //=> true 19 | 20 | ansiRegex().test('cake'); 21 | //=> false 22 | 23 | '\u001B[4mcake\u001B[0m'.match(ansiRegex()); 24 | //=> ['\u001B[4m', '\u001B[0m'] 25 | 26 | '\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); 27 | //=> ['\u001B[4m'] 28 | 29 | '\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); 30 | //=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] 31 | ``` 32 | */ 33 | export default function ansiRegex(options?: Options): RegExp; 34 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/anymatch/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com) 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/foreground-child/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) 2015-2023 Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/tailwindcss/src/util/createPlugin.js: -------------------------------------------------------------------------------- 1 | function createPlugin(plugin, config) { 2 | return { 3 | handler: plugin, 4 | config, 5 | } 6 | } 7 | 8 | createPlugin.withOptions = function (pluginFunction, configFunction = () => ({})) { 9 | const optionsFunction = function (options) { 10 | return { 11 | __options: options, 12 | handler: pluginFunction(options), 13 | config: configFunction(options), 14 | } 15 | } 16 | 17 | optionsFunction.__isOptionsFunction = true 18 | 19 | // Expose plugin dependencies so that `object-hash` returns a different 20 | // value if anything here changes, to ensure a rebuild is triggered. 21 | optionsFunction.__pluginFunction = pluginFunction 22 | optionsFunction.__configFunction = configFunction 23 | 24 | return optionsFunction 25 | } 26 | 27 | export default createPlugin 28 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/fast-glob/out/utils/fs.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.createDirentFromStats = void 0; 4 | class DirentFromStats { 5 | constructor(name, stats) { 6 | this.name = name; 7 | this.isBlockDevice = stats.isBlockDevice.bind(stats); 8 | this.isCharacterDevice = stats.isCharacterDevice.bind(stats); 9 | this.isDirectory = stats.isDirectory.bind(stats); 10 | this.isFIFO = stats.isFIFO.bind(stats); 11 | this.isFile = stats.isFile.bind(stats); 12 | this.isSocket = stats.isSocket.bind(stats); 13 | this.isSymbolicLink = stats.isSymbolicLink.bind(stats); 14 | } 15 | } 16 | function createDirentFromStats(name, stats) { 17 | return new DirentFromStats(name, stats); 18 | } 19 | exports.createDirentFromStats = createDirentFromStats; 20 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/minipass/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) 2017-2023 npm, Inc., Isaac Z. Schlueter, and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/picocolors/LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/anymatch/index.d.ts: -------------------------------------------------------------------------------- 1 | type AnymatchFn = (testString: string) => boolean; 2 | type AnymatchPattern = string|RegExp|AnymatchFn; 3 | type AnymatchMatcher = AnymatchPattern|AnymatchPattern[] 4 | type AnymatchTester = { 5 | (testString: string|any[], returnIndex: true): number; 6 | (testString: string|any[]): boolean; 7 | } 8 | 9 | type PicomatchOptions = {dot: boolean}; 10 | 11 | declare const anymatch: { 12 | (matchers: AnymatchMatcher): AnymatchTester; 13 | (matchers: AnymatchMatcher, testString: null, returnIndex: true | PicomatchOptions): AnymatchTester; 14 | (matchers: AnymatchMatcher, testString: string|any[], returnIndex: true | PicomatchOptions): number; 15 | (matchers: AnymatchMatcher, testString: string|any[]): boolean; 16 | } 17 | 18 | export {AnymatchMatcher as Matcher} 19 | export {AnymatchTester as Tester} 20 | export default anymatch 21 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/is-binary-path/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "is-binary-path", 3 | "version": "2.1.0", 4 | "description": "Check if a file path is a binary file", 5 | "license": "MIT", 6 | "repository": "sindresorhus/is-binary-path", 7 | "author": { 8 | "name": "Sindre Sorhus", 9 | "email": "sindresorhus@gmail.com", 10 | "url": "sindresorhus.com" 11 | }, 12 | "engines": { 13 | "node": ">=8" 14 | }, 15 | "scripts": { 16 | "test": "xo && ava && tsd" 17 | }, 18 | "files": [ 19 | "index.js", 20 | "index.d.ts" 21 | ], 22 | "keywords": [ 23 | "binary", 24 | "extensions", 25 | "extension", 26 | "file", 27 | "path", 28 | "check", 29 | "detect", 30 | "is" 31 | ], 32 | "dependencies": { 33 | "binary-extensions": "^2.0.0" 34 | }, 35 | "devDependencies": { 36 | "ava": "^1.4.1", 37 | "tsd": "^0.7.2", 38 | "xo": "^0.24.0" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/@nodelib/fs.scandir/out/utils/fs.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.createDirentFromStats = void 0; 4 | class DirentFromStats { 5 | constructor(name, stats) { 6 | this.name = name; 7 | this.isBlockDevice = stats.isBlockDevice.bind(stats); 8 | this.isCharacterDevice = stats.isCharacterDevice.bind(stats); 9 | this.isDirectory = stats.isDirectory.bind(stats); 10 | this.isFIFO = stats.isFIFO.bind(stats); 11 | this.isFile = stats.isFile.bind(stats); 12 | this.isSocket = stats.isSocket.bind(stats); 13 | this.isSymbolicLink = stats.isSymbolicLink.bind(stats); 14 | } 15 | } 16 | function createDirentFromStats(name, stats) { 17 | return new DirentFromStats(name, stats); 18 | } 19 | exports.createDirentFromStats = createDirentFromStats; 20 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/electron-to-chromium/chromium-versions.json: -------------------------------------------------------------------------------- 1 | {"39":"0.20","40":"0.21","41":"0.21","42":"0.25","43":"0.27","44":"0.30","45":"0.31","47":"0.36","49":"0.37","50":"1.1","51":"1.2","52":"1.3","53":"1.4","54":"1.4","56":"1.6","58":"1.7","59":"1.8","61":"2.0","66":"3.0","69":"4.0","72":"5.0","73":"5.0","76":"6.0","78":"7.0","79":"8.0","80":"8.0","82":"9.0","83":"9.0","84":"10.0","85":"10.0","86":"11.0","87":"11.0","89":"12.0","90":"13.0","91":"13.0","92":"14.0","93":"14.0","94":"15.0","95":"16.0","96":"16.0","98":"17.0","99":"18.0","100":"18.0","102":"19.0","103":"20.0","104":"20.0","105":"21.0","106":"21.0","107":"22.0","108":"22.0","110":"23.0","111":"24.0","112":"24.0","114":"25.0","116":"26.0","118":"27.0","119":"28.0","120":"28.0","121":"29.0","122":"29.0","123":"30.0","124":"30.0","125":"31.0","126":"31.0","127":"32.0","128":"32.0","129":"33.0","130":"33.0","131":"34.0","132":"34.0"} -------------------------------------------------------------------------------- /alignment-handbook/node_modules/postcss-nested/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "postcss-nested", 3 | "version": "6.2.0", 4 | "description": "PostCSS plugin to unwrap nested rules like how Sass does it", 5 | "keywords": [ 6 | "postcss", 7 | "css", 8 | "postcss-plugin", 9 | "sass", 10 | "nested" 11 | ], 12 | "author": "Andrey Sitnik ", 13 | "license": "MIT", 14 | "repository": "postcss/postcss-nested", 15 | "engines": { 16 | "node": ">=12.0" 17 | }, 18 | "funding": [ 19 | { 20 | "type": "opencollective", 21 | "url": "https://opencollective.com/postcss/" 22 | }, 23 | { 24 | "type": "github", 25 | "url": "https://github.com/sponsors/ai" 26 | } 27 | ], 28 | "peerDependencies": { 29 | "postcss": "^8.2.14" 30 | }, 31 | "dependencies": { 32 | "postcss-selector-parser": "^6.1.1" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /alignment-handbook/node_modules/signal-exit/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) 2015-2023 Benjamin Coe, Isaac Z. Schlueter, and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software 6 | for any purpose with or without fee is hereby granted, provided 7 | that the above copyright notice and this permission notice 8 | appear in all copies. 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES 12 | OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE 13 | LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES 14 | OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 15 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 16 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | -------------------------------------------------------------------------------- /alignment-handbook/setup.cfg: -------------------------------------------------------------------------------- 1 | [isort] 2 | default_section = FIRSTPARTY 3 | ensure_newline_before_comments = True 4 | force_grid_wrap = 0 5 | include_trailing_comma = True 6 | known_first_party = alignment 7 | known_third_party = 8 | transformers 9 | datasets 10 | fugashi 11 | git 12 | h5py 13 | matplotlib 14 | nltk 15 | numpy 16 | packaging 17 | pandas 18 | psutil 19 | pytest 20 | rouge_score 21 | sacrebleu 22 | seqeval 23 | sklearn 24 | streamlit 25 | torch 26 | tqdm 27 | 28 | line_length = 119 29 | lines_after_imports = 2 30 | multi_line_output = 3 31 | use_parentheses = True 32 | 33 | [flake8] 34 | ignore = E203, E501, E741, W503, W605 35 | max-line-length = 119 36 | per-file-ignores = 37 | # imported but unused 38 | __init__.py: F401 39 | 40 | [tool:pytest] 41 | doctest_optionflags=NUMBER NORMALIZE_WHITESPACE ELLIPSIS --------------------------------------------------------------------------------