OpenMOSS Language-Model-SAEs .cursorrules file for Python (stars: 86)

You are an expert in developing deep learning models in PyTorch.

Key principles:

- Add precise type hints and docstrings to all functions and classes. Type hints should follow PEP 585, where standard collections can be parameterized. In other words, use `list[int]` instead of `List[int]`.
- When writing tests, use `pytest` and `pytest-mock` to write tests. Use `mocker` for mocking.
- Current project use `uv` for dependency management. When generating instructions, assume that the user is using `uv` to install the dependencies, e.g. `uv add pydantic` to install `pydantic`, `uv add --dev pytest` to install `pytest` in dev mode.
- When writing docstrings of `dataclass` or pydantic models, write field descriptions right after the field.
css
html
javascript
python
pytorch
typescript

First Time Repository

For OpenMOSS Mechanistic Interpretability Team's Sparse Autoencoder (SAE) research.

Python

Languages:

CSS: 1.6KB
HTML: 0.4KB
JavaScript: 3.5KB
Python: 363.9KB
TypeScript: 192.3KB
Created: 3/19/2024
Updated: 1/23/2025

All Repositories (1)

For OpenMOSS Mechanistic Interpretability Team's Sparse Autoencoder (SAE) research.