Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,42 @@ huggingface-cli login

The `triton` package cannot be installed in Windows. Instead use `pip install triton-windows`.

### Simplified Installation with uv

To make your setup fast and reliable, we now support a uv-based dependency management system.
This isn’t meant to change how you use CSM—it just makes installation reproducible
and even handles platform differences (for example, using `triton` on Linux versus `triton-windows` on Windows).

#### Getting Started

1. **Install uv (Optional but Recommended):**
If you haven’t installed uv yet, run:
```bash
pip install uv
```
For more details, check out the [uv installation instructions](https://github.com/astral-sh/uv?tab=readme-ov-file#installation).

2. **Synchronize Your Environment:**
In the project directory, simply run:
```bash
uv sync
```
This installs all dependencies for CSM and generates a lockfile to guarantee a reproducible setup.

3. **Run CSM:**
To execute your code with the configured environment, use:
```bash
uv run python your_example.py
```

#### Adding CSM to Other Projects

If you’re working on another project and want to integrate CSM as a dependency in editable mode, you can do so with:
```bash
uv add --editable git+https://github.com/SesameAILabs/csm@master#egg=csm
```
This command adds CSM directly from our GitHub repository, allowing you to work with the latest version as you develop your project.

## Usage

Generate a sentence
Expand Down
23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[project]
name = "csm"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"huggingface-hub==0.28.1",
"moshi==0.2.2",
"silentcipher",
"tokenizers==0.21.0",
"torch==2.4.0",
"torchao==0.9.0",
"torchaudio==2.4.0",
"torchtune==0.4.0",
"transformers==4.49.0",
"numpy>=1.26.0,<2.0",
"triton~=3.0.0; sys_platform != 'win32'",
"triton-windows>=3.0.0,<4.0.0; sys_platform == 'win32'",
]

[tool.uv.sources]
silentcipher = { git = "https://github.com/SesameAILabs/silentcipher", rev = "master" }
Loading