Skip to content

Commit

Permalink
Docs (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakmro authored Nov 8, 2024
1 parent 613ff55 commit b6da6b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 52 deletions.
10 changes: 5 additions & 5 deletions docs/docs/guides/exporting-llama.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ sidebar_position: 2
In order to make the process of export as simple as possible for you, we created a script that runs a Docker container and exports the model.

## Steps to export Llama
### 1. Create an Account:
### 1. Create an Account
Get a [HuggingFace](https://huggingface.co/) account. This will allow you to download needed files. You can also use the [official Llama website](https://www.llama.com/llama-downloads/).

### 2. Select a Model:
### 2. Select a Model
Pick the model that suits your needs. Before you download it, you'll need to accept a license. For best performance, we recommend using Spin-Quant or QLoRA versions of the model:
- [Llama 3.2 3B](https://huggingface.co/meta-llama/Llama-3.2-3B-Instruct/tree/main/original)
- [Llama 3.2 1B](https://huggingface.co/meta-llama/Llama-3.2-1B-Instruct/tree/main/original)
Expand All @@ -18,16 +18,16 @@ Pick the model that suits your needs. Before you download it, you'll need to acc
- [Llama 3.2 3B QLoRA](https://huggingface.co/meta-llama/Llama-3.2-3B-Instruct-QLORA_INT4_EO8/tree/main)
- [Llama 3.2 1B QLoRA](https://huggingface.co/meta-llama/Llama-3.2-1B-Instruct-QLORA_INT4_EO8/tree/main)

### 3. Download Files:
### 3. Download Files
Download the `consolidated.00.pth`, `params.json` and `tokenizer.model` files. If you can't see them, make sure to check the `original` directory.

### 4. Rename the Tokenizer File:
### 4. Rename the Tokenizer File
Rename the `tokenizer.model` file to `tokenizer.bin` as required by the library:
```bash
mv tokenizer.model tokenizer.bin
```

### 5. Run the Export Script:
### 5. Run the Export Script
Navigate to the `llama_export` directory and run the following command:
```bash
./build_llama_binary.sh --model-path /path/to/consolidated.00.pth --params-path /path/to/params.json
Expand Down
49 changes: 2 additions & 47 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/*
In swizzled components look for "SWM -" string to see our modifications
*/

const lightCodeTheme = require('./src/theme/CodeBlock/highlighting-light.js');
const darkCodeTheme = require('./src/theme/CodeBlock/highlighting-dark.js');
// @ts-check
Expand Down Expand Up @@ -36,8 +32,8 @@ const config = {
theme: {
customCss: require.resolve('./src/css/index.css'),
},
googleAnalytics: {
trackingID: '...',
gtag: {
trackingID: 'G-TJND8QJM9P',
anonymizeIP: true,
},
}),
Expand Down Expand Up @@ -85,47 +81,6 @@ const config = {
indexName: 'react-native-executorch',
},
}),
plugins: [
// ...[
// process.env.NODE_ENV === 'production' && '@docusaurus/plugin-debug',
// ].filter(Boolean),
// async function reanimatedDocusaurusPlugin(context, options) {
// return {
// name: 'react-native-reanimated/docusaurus-plugin',
// configureWebpack(config, isServer, utils) {
// const processMock = !isServer ? { process: { env: {} } } : {};

// const raf = require('raf');
// raf.polyfill();

// return {
// mergeStrategy: {
// 'resolve.extensions': 'prepend',
// },
// plugins: [
// new webpack.DefinePlugin({
// ...processMock,
// __DEV__: 'false',
// setImmediate: () => {},
// }),
// ],
// module: {
// rules: [
// {
// test: /\.txt/,
// type: 'asset/source',
// },
// ],
// },
// resolve: {
// alias: { 'react-native$': 'react-native-web' },
// extensions: ['.web.js', '...'],
// },
// };
// },
// };
// },
],
};

module.exports = config;

0 comments on commit b6da6b2

Please sign in to comment.