Skip to content

Commit

Permalink
update faq and ci (#72)
Browse files Browse the repository at this point in the history
* update faq and ci

* update issue form

* change title level

* more questions

* trying to dbg ci

* trying to fix vite vulnerability

* fix

* doc
  • Loading branch information
adefossez authored Sep 19, 2024
1 parent f47ece4 commit 8267fce
Show file tree
Hide file tree
Showing 9 changed files with 259 additions and 214 deletions.
6 changes: 5 additions & 1 deletion .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ name: Question
description: You have a question about Moshi/Mimi, this codebase.
labels: ["question", "triage"]
body:
- type: markdown
attributes:
value: |
Please first check the [FAQ](https://github.com/kyutai-labs/moshi/blob/main/FAQ.md).
- type: checkboxes
id: terms
attributes:
label: Due diligence
description: Have you searched the existing issues / Google / asked ChatGPT?
description: Have you searched the existing issues / FAQ / Google / asked ChatGPT?
options:
- label: I have done my due diligence in trying to find the answer myself.
required: true
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/moshi_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ runs:
steps:
- uses: actions/setup-python@v2
with:
python-version: '3.10'
python-version: '3.10.14'
- uses: actions/cache@v3
id: cache
with:
Expand All @@ -22,6 +22,6 @@ runs:
- name: Setup env
shell: bash
run: |
source env/bin/activate
pre-commit install || ( echo "FAILED" && ls && ls env && ls env/bin/ && exit 1 )
source env/bin/activate
pip install -e './moshi[dev]'
pre-commit install
31 changes: 31 additions & 0 deletions FAQ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# FAQ

Here is the answer to a number of frequently asked questions.

### Will you release training code?

We will release some training / fine-tuning code, but we do not have any timeline yet. Please be patient.

### Will you release the dataset?

We will not release the pre-training dataset.

### Is Moshi multilingual?

At the moment no. Moshi only speaks English. It has some basic support for translating some sentences
or words to other languages, but you shouldn't expect to use it fully in any other language than English.

### Can I change Moshi's voice / personality?

This would require fine tuning, which is not currently supported.

### Can Moshi run on a M1, or smaller GPUs?

Sadly we do not think this is currently possible. Quantizing beyond 4 bits lead to dramatic
decrease in quality, see [PR #58](https://github.com/kyutai-labs/moshi/pull/58).
While we keep those limitations in mind for future versions, there is no immediate solution.

### Can we run quantized Moshi with PyTorch?

At the moment no, we might look into adding this feature when we get the time. At the moment
it is however possible to use the Rust backend, which should run in int8 with CUDA.
45 changes: 25 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,21 @@ All models are released under the CC-BY 4.0 license.

## Requirements

You will need at least Python 3.10. For specific requirements, please check the individual backends
You will need at least Python 3.10, with 3.12 recommended. For specific requirements, please check the individual backends
directories. You can install the PyTorch and MLX clients with the following:

```bash
pip install moshi # moshi PyTorch, from PyPI
pip install moshi_mlx # moshi MLX, from PyPI
pip install moshi_mlx # moshi MLX, from PyPI, best with Python 3.12.
# Or the bleeding edge versions for Moshi and Moshi-MLX.
pip install -e "git+https://[email protected]/kyutai-labs/moshi.git#egg=moshi&subdirectory=moshi"
pip install -e "git+https://[email protected]/kyutai-labs/moshi.git#egg=moshi_mlx&subdirectory=moshi_mlx"

pip install rustymimi # mimi, rust implementation with Python bindings from PyPI
```

If you get an error when installing `moshi_mlx` or `rustymimi` (which `moshi_mlx` depends on),
you might need to install the [Rust toolchain](https://rustup.rs/) to install `rustymimi` from sources.
If you are not using Python 3.12, you might get an error when installing
`moshi_mlx` or `rustymimi` (which `moshi_mlx` depends on). Then,you will need to install the [Rust toolchain](https://rustup.rs/), or switch to Python 3.12.

While we hope that the present codebase will work on Windows, we do not provide official support for it.
We have tested the MLX version on a MacBook Pro M3. At the moment, we do not support quantization
Expand All @@ -100,22 +100,6 @@ for the PyTorch version, so you will need a GPU with a significant amount of mem
For using the Rust backend, you will need a recent version of the [Rust toolchain](https://rustup.rs/).
To compile GPU support, you will also need the [CUDA](https://developer.nvidia.com/cuda-toolkit) properly installed for your GPU, in particular with `nvcc`.

## Development

If you wish to install from a clone of this repository, maybe to further develop Moshi, you can do the following:
```bash
# From the root of the clone of the repo
pip install -e 'moshi[dev]'
pip install -e 'moshi_mlx[dev]'
pre-commit install
```

If you wish to build locally `rustymimi` (assuming you have Rust properly installed):
```bash
pip install maturin
maturin dev -r -m rust/mimi-pyo3/Cargo.toml
```

## Python (PyTorch)

The PyTorch based API can be found in the `moshi` directory. It provides a streaming
Expand Down Expand Up @@ -229,6 +213,27 @@ npm run build

The web UI can then be found in the `client/dist` directory.

## Development

If you wish to install from a clone of this repository, maybe to further develop Moshi, you can do the following:
```bash
# From the root of the clone of the repo
pip install -e 'moshi[dev]'
pip install -e 'moshi_mlx[dev]'
pre-commit install
```

If you wish to build locally `rustymimi` (assuming you have Rust properly installed):
```bash
pip install maturin
maturin dev -r -m rust/mimi-pyo3/Cargo.toml
```

## FAQ

Checkout the [Frequently Asked Questions](FAQ.md) section before opening an issue.


## License

The present code is provided under the MIT license for the Python parts, and Apache license for the Rust backend.
Expand Down
Loading

0 comments on commit 8267fce

Please sign in to comment.