Skip to content

Commit

Permalink
Grammatical and Typographical improvements (#1139)
Browse files Browse the repository at this point in the history
* Update faq.rst

* Update guideline.rst

* Update compile_models.rst

* Update distribute_compiled_models.rst

* Update get-vicuna-weight.rst

* Update python.rst

* Update android.rst

* Update cli.rst

* Update ios.rst

* Update javascript.rst

* Update python.rst

* Update rest.rst
  • Loading branch information
tmsagarofficial authored Oct 28, 2023
1 parent 24f795e commit 2c492e5
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 61 deletions.
2 changes: 1 addition & 1 deletion docs/community/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Frequently Asked Questions

This is a list of Frequently Asked Questions (FAQ) about the MLC-LLM. Feel free to suggest new entries!

... How can I customize the temperature, repetition penalty of models?
... How can I customize the temperature, and repetition penalty of models?
Please check our :doc:`/get_started/mlc_chat_config` tutorial.

... What's the quantization algorithm MLC-LLM using?
Expand Down
20 changes: 10 additions & 10 deletions docs/community/guideline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ Ready to contribute to MLC-LLM? Awesome! We are excited to see you are ready to
The standard way to make changes to MLC-LLM code base is through creating a `pull-request <https://github.com/mlc-ai/mlc-llm/pulls>`__,
and we will review your code and merge it to the code base when it is ready.

The first step to become a developer is to `fork <https://github.com/mlc-ai/mlc-llm/fork>`__ the repository to your own
The first step to becoming a developer is to `fork <https://github.com/mlc-ai/mlc-llm/fork>`__ the repository to your own
github account, you will notice a repository under ``https://github.com/username/mlc-llm`` where ``username`` is your github user name.

You can clone your fork to your local machine and commit changes, or edit the contents of your fork (in the case you are just fixing typos)
on github directly. Once your update is complete, you can click the ``contribute`` button and open a pull request to the main repository.
on GitHub directly. Once your update is complete, you can click the ``contribute`` button and open a pull request to the main repository.

.. _contribute-new-models:

Expand Down Expand Up @@ -86,14 +86,14 @@ Fo your convenience, you can use `clang-format <https://clang.llvm.org/docs/Clan
General Development Process
---------------------------

Everyone in the community is welcomed to send patches, documents, and propose new directions to the project.
The key guideline here is to enable everyone in the community to get involved and participate the decision and development.
Everyone in the community is welcome to send patches, documents, and propose new directions to the project.
The key guideline here is to enable everyone in the community to get involved and participate in the decision and development.
We encourage public discussion in different channels, so that everyone in the community can participate
and get informed in developments.

Code reviews are one of the key ways to ensure the quality of the code. High-quality code reviews prevent technical debt
for long-term and are crucial to the success of the project. A pull request needs to be reviewed before it gets merged.
A committer who has the expertise of the corresponding area would moderate the pull request and the merge the code when
A committer who has the expertise of the corresponding area would moderate the pull request and merge the code when
it is ready. The corresponding committer could request multiple reviewers who are familiar with the area of the code.
We encourage contributors to request code reviews themselves and help review each other's code -- remember everyone
is volunteering their time to the community, high-quality code review itself costs as much as the actual code
Expand All @@ -108,18 +108,18 @@ moderate technical discussions in a diplomatic way, and provide suggestions with
Committers
^^^^^^^^^^

Committers are individuals who are granted the write access to the project. A committer is usually responsible for
Committers are individuals who are granted with write access to the project. A committer is usually responsible for
a certain area or several areas of the code where they oversee the code review process.
The area of contribution can take all forms, including code contributions and code reviews, documents, education, and outreach.
The review of pull requests will be assigned to the committers who recently contribute to the area this PR belong to.
Committers are essential for a high quality and healthy project. The community actively look for new committers
The review of pull requests will be assigned to the committers who recently contribute to the area this PR belongs to.
Committers are essential for a high quality and healthy project. The community actively looks for new committers
from contributors. Each existing committer can nominate new committers to MLC projects.

.. _roles-contributors:

Contributors
^^^^^^^^^^^^
We also welcome contributors if you are not ready to be a committer yet. Everyone who contributes to
the project (in the form of code, bugfix, documentation, tutorials, etc) is a contributors.
the project (in the form of code, bugfix, documentation, tutorials, etc) is a contributor.
We maintain a `page <https://github.com/mlc-ai/mlc-llm/blob/main/CONTRIBUTORS.md>`__ to acknowledge contributors,
please let us know if you contribute to the project and your name is not included in the list.
please let us know if you contribute to the project and if your name is not included in the list.
20 changes: 10 additions & 10 deletions docs/compilation/compile_models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ Compile Models via MLC
======================

This page describes how to compile a model with MLC LLM. Model compilation takes model inputs, produces quantized model weights,
and optimized model lib for a given platform. It enables users to bring their own new model weights, try different quantization modes,
and optimizes model lib for a given platform. It enables users to bring their own new model weights, try different quantization modes,
and customize the overall model optimization flow.

.. note::
Before you proceed, please make sure that you have :ref:`install-tvm-unity` correctly installed on your machine.
TVM-Unity is the necessary foundation for us to compile models with MLC LLM.
If you want to build webgpu, please also complete :ref:`install-web-build`.
Please also follow the instruction in :ref:`deploy-cli` to obtain the CLI app that can be used to chat with the compiled model.
Please also follow the instructions in :ref:`deploy-cli` to obtain the CLI app that can be used to chat with the compiled model.
Finally, we strongly recommend you read :ref:`project-overview` first to get familiarized with the high-level terminologies.


Expand All @@ -25,7 +25,7 @@ Install MLC-LLM Package
Work with Source Code
^^^^^^^^^^^^^^^^^^^^^

The easiest way is to use MLC-LLM is to clone the repository, and compile models under the root directory of the repository.
The easiest way to use MLC-LLM is to clone the repository, and compile models under the root directory of the repository.

.. code:: bash
Expand Down Expand Up @@ -106,7 +106,7 @@ your personal computer.
xcrun: error: unable to find utility "metallib", not a developer tool or in PATH
, please check and make sure you have Command Line Tools for Xcode installed correctly.
You can use ``xcrun metal`` to validate: when it prints ``metal: error: no input files``, it means the Command Line Tools for Xcode is installed and can be found, and you can proceed the model compiling.
You can use ``xcrun metal`` to validate: when it prints ``metal: error: no input files``, it means the Command Line Tools for Xcode is installed and can be found, and you can proceed with the model compiling.

.. group-tab:: Android

Expand Down Expand Up @@ -172,7 +172,7 @@ We can check the output with the commands below:
tokenizer_config.json
We now chat with the model using the command line interface (CLI) app.
Follow the build from source instruction
Follow the build from the source instruction

.. code:: shell
Expand Down Expand Up @@ -271,7 +271,7 @@ We can check the output with the commands below:
tokenizer_config.json
The model lib ``dist/RedPajama-INCITE-Chat-3B-v1-q4f16_1/RedPajama-INCITE-Chat-3B-v1-q4f16_1-webgpu.wasm``
can be uploaded to internet. You can pass a ``model_lib_map`` field to WebLLM app config to use this library.
can be uploaded to the internet. You can pass a ``model_lib_map`` field to WebLLM app config to use this library.


Each compilation target produces a specific model library for the given platform. The model weight is shared across
Expand Down Expand Up @@ -311,7 +311,7 @@ In other cases you need to specify the model via ``--model``.
- ``dist/models/MODEL_NAME_OR_PATH`` (e.g., ``--model Llama-2-7b-chat-hf``),
- ``MODEL_NAME_OR_PATH`` (e.g., ``--model /my-model/Llama-2-7b-chat-hf``).

When running the compile command using ``--model``, please make sure you have placed the model to compile under ``dist/models/`` or other location on the disk.
When running the compile command using ``--model``, please make sure you have placed the model to compile under ``dist/models/`` or another location on the disk.

--hf-path HUGGINGFACE_NAME The name of the model's Hugging Face repository.
We will download the model to ``dist/models/HUGGINGFACE_NAME`` and load the model from this directory.
Expand All @@ -336,11 +336,11 @@ The following arguments are optional:
we will use the maximum sequence length from the ``config.json`` in the model directory.
--reuse-lib LIB_NAME Specifies the previously generated library to reuse.
This is useful when building the same model architecture with different weights.
You can refer to the :ref:`model distribution <distribute-model-step3-specify-model-lib>` page for detail of this argument.
You can refer to the :ref:`model distribution <distribute-model-step3-specify-model-lib>` page for details of this argument.
--use-cache When ``--use-cache=0`` is specified,
the model compilation will not use cached file from previous builds,
and will compile the model from the very start.
Using cache can help reduce the time needed to compile.
Using a cache can help reduce the time needed to compile.
--debug-dump Specifies whether to dump debugging files during compilation.
--use-safetensors Specifies whether to use ``.safetensors`` instead of the default ``.bin`` when loading in model weights.

Expand All @@ -354,7 +354,7 @@ This section lists compile commands for more models that you can try out.
.. tab:: Model: Llama-2-7B

Please `request for access <https://huggingface.co/meta-llama>`_ to the Llama-2 weights from Meta first.
After granted the access, please create directory ``dist/models`` and download the model to the directory.
After granted access, please create directory ``dist/models`` and download the model to the directory.
For example, you can run the following code:

.. code:: shell
Expand Down
6 changes: 3 additions & 3 deletions docs/compilation/distribute_compiled_models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ You can **optionally** customize the chat config file
``dist/RedPajama-INCITE-Instruct-3B-v1-q4f16_1/params/mlc-chat-config.json`` (checkout :ref:`configure-mlc-chat-json` for more detailed instructions).
You can also simply use the default configuration and skip this step.

For demonstration purpose, we update ``mean_gen_len`` to 32 and ``max_gen_len`` to 64.
For demonstration purposes, we update ``mean_gen_len`` to 32 and ``max_gen_len`` to 64.
We also update ``conv_template`` to ``"LM"`` because the model is instruction-tuned.


Expand Down Expand Up @@ -160,7 +160,7 @@ Download the Distributed Models and Run in iOS App
--------------------------------------------------

For iOS app, model libraries are statically packed into the app at the time of app building.
Therefore, the iOS app supports running any models whose model libraries are integrated into the app.
Therefore, the iOS app supports running any model whose model libraries are integrated into the app.
You can check the :ref:`list of supported model libraries <using-prebuilt-models-ios>`.

To download and run the compiled RedPajama-3B instruct model on iPhone, we need to reuse the integrated ``RedPajama-INCITE-Chat-3B-v1-q4f16_1`` model library.
Expand Down Expand Up @@ -198,7 +198,7 @@ Now we can download the model weights in iOS app and run the model by following

.. tab:: Step 4

When the download is finished, click into the model and enjoy.
When the download is finished, click on the model and enjoy.

.. image:: https://raw.githubusercontent.com/mlc-ai/web-data/main/images/mlc-llm/tutorials/iPhone-distribute-4.jpeg
:align: center
Expand Down
8 changes: 4 additions & 4 deletions docs/compilation/get-vicuna-weight.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Getting Vicuna Weights
:local:
:depth: 2

`Vicuna <https://lmsys.org/blog/2023-03-30-vicuna/>`_ is a open-source chatbot trained by fine-tuning `LLaMA <https://ai.facebook.com/blog/large-language-model-llama-meta-ai/>`_ on `ShartGPT <https://huggingface.co/datasets/anon8231489123/ShareGPT_Vicuna_unfiltered>`_ data.
`Vicuna <https://lmsys.org/blog/2023-03-30-vicuna/>`_ is an open-source chatbot trained by fine-tuning `LLaMA <https://ai.facebook.com/blog/large-language-model-llama-meta-ai/>`_ on `ShartGPT <https://huggingface.co/datasets/anon8231489123/ShareGPT_Vicuna_unfiltered>`_ data.

Please note that the official Vicuna weights are delta weights applied to the LLaMA weights in order to comply with the LLaMA license. Users are responsible for applying these delta weights themselves.

Expand All @@ -14,7 +14,7 @@ In this tutorial, we will show how to apply the delta weights to LLaMA weights t
Install FastChat
----------------

FastChat offers convenient utility functions for applying delta to LLaMA weights. You can easily install it using pip.
FastChat offers convenient utility functions for applying the delta to LLaMA weights. You can easily install it using pip.

.. code-block:: bash
Expand All @@ -38,14 +38,14 @@ Then download the weights (both the LLaMA weight and Vicuna delta weight):
git clone https://huggingface.co/lmsys/vicuna-7b-delta-v1.1
There is a name mis-alignment issue in the LLaMA weights and Vicuna delta weights.
There is a name misalignment issue in the LLaMA weights and Vicuna delta weights.
Please follow these steps to modify the content of the "config.json" file:

.. code-block:: bash
sed -i 's/LLaMAForCausalLM/LlamaForCausalLM/g' llama-7b-hf/config.json
Then use ``fschat`` to apply delta to LLaMA weights
Then use ``fschat`` to apply the delta to LLaMA weights

.. code-block:: bash
Expand Down
8 changes: 4 additions & 4 deletions docs/compilation/python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Python API for Model Compilation
:local:
:depth: 2

We expose Python API for compiling/building model in the package :py:mod:`mlc_llm`, so
that users may build model in any directory in their program (i.e. not just
We expose Python API for compiling/building models in the package :py:mod:`mlc_llm`, so
that users may build a model in any directory in their program (i.e. not just
within the mlc-llm repo).

Install MLC-LLM as a Package
Expand Down Expand Up @@ -44,7 +44,7 @@ After installing the package, you can build the model using :meth:`mlc_llm.build
which takes in an instance of :class:`BuildArgs` (a dataclass that represents
the arguments for building a model).

For detailed instruction with code, please refer to `the python notebook
For detailed instructions with code, please refer to `the Python notebook
<https://github.com/mlc-ai/notebooks/blob/main/mlc-llm/tutorial_compile_llama2_with_mlc_llm.ipynb>`_
(executable in Colab), where we walk you through compiling Llama-2 with :py:mod:`mlc_llm`
in Python.
Expand All @@ -56,7 +56,7 @@ API Reference

In order to use the python API :meth:`mlc_llm.build_model`, users need to create
an instance of the dataclass :class:`BuildArgs`. The corresponding arguments in
command line shown in :ref:`compile-command-specification` are automatically
the command line shown in :ref:`compile-command-specification` are automatically
converted from the definition of :class:`BuildArgs` and are equivalent.

Then with an instantiated :class:`BuildArgs`, users can call the build API
Expand Down
Loading

0 comments on commit 2c492e5

Please sign in to comment.