Skip to content

Commit 31b6115

Browse files
authored
Contribution rules and update details (#1961)
1 parent 598f63a commit 31b6115

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

CONTRIBUTING.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ Do you think a feature is missing or would be a great addition to the project? P
2323
* look for GitHub issues marked with the *help wanted* label: these are developments that we find particularly suited for community contributions.
2424
* If you are planning to make a large change to the existing code, consider asking first on [the forum](https://forum.opennmt.net/) to confirm that it is welcome.
2525

26+
## Contribution rules
27+
28+
CTranslate2 is a low-level, performance-critical codebase. A single misplaced pointer or inefficient memory allocation (which LLMs often get wrong) can take hours to debug.
29+
30+
To maintain code integrity and manage maintainer workload, we apply the following policy:
31+
32+
* Use of AI tools for brainstorming or minor assistance is acceptable, but contributors must explicitly disclose how AI was used and remain fully responsible for correctness, performance, and design. Submissions that appear generated without deep understanding will be declined. Verifying AI output for correctness and performance is more time-consuming than writing code manually.
33+
34+
* Mandatory Deep Understanding: Contributors must fully understand their code and be prepared to justify the purpose of part of the code base.
35+
36+
* Please contribute within your area of expertise. If you are not familiar with the core codebase, consider contributing to documentation, examples, or Hugging Face integrations.
37+
38+
2639
### Building the sources
2740

2841
See [Install from sources](https://opennmt.net/CTranslate2/installation.html#install-from-sources).
@@ -85,7 +98,7 @@ The list is ordered on 5. from the largest to smallest time.
8598

8699
#### `StorageView` class
87100

88-
CTranslate2 uses [row-major](https://en.wikipedia.org/wiki/Row-_and_column-major_order) storages, usually encapsulated in the `StorageView` class. This class acts like a tensor representation but without the mathematical semantics. It is convenience wrapper to view a buffer of data in a particular shape, and provides methods to resize, reshape, and copy data. The underlying storage has a type (e.g. `float`) and a location (e.g. GPU #1) which are both resolved at runtime.
101+
CTranslate2 uses [row-major](https://en.wikipedia.org/wiki/Row-_and_column-major_order) storages, usually encapsulated in the `StorageView` class. This class acts like a tensor representation but without the mathematical semantics. It is a convenience wrapper to view a buffer of data in a particular shape, and provides methods to resize, reshape, and copy data. The underlying storage has a type (e.g. `float`) and a location (e.g. GPU #1) which are both resolved at runtime.
89102

90103
To maximize performance, the implementation avoid new allocations when possible:
91104

@@ -144,7 +157,7 @@ To limit the size of the packages pushed to PyPI, some libraries are not include
144157

145158
One of the benefits of this dynamic loading is that multiple versions of cuBLAS and cuDNN are supported by the same binary. In particular, users can install any CUDA 12.x version as long as it provides `libcublas.so.12`.
146159

147-
The Python library only support CUDA 12.x. C++ source code is always compatible with CUDA 11, possible to use CUDA 11 libraries during compilation to create CUDA 11.x support wheel.
160+
The Python library only supports CUDA 12.x. C++ source code is always compatible with CUDA 11, possible to use CUDA 11 libraries during compilation to create CUDA 11.x support wheel.
148161

149162
### Updating other dependencies
150163

@@ -161,7 +174,7 @@ If a dependency needs an update, it is particularly important that it is updated
161174

162175
### Managing PyPI project size limit
163176

164-
Projects on PyPI have a size limit. The default limit is 10GB and [we already requested](https://github.com/pypi/support/issues/1480) an increase to 20GB in the past. Because increase requests can take several months to be accepted, we now try to work with this 20GB limit.
177+
Projects on PyPI have a size limit. The default limit is 10GB. Currently the CTranslate2 project [has 50GB](https://github.com/pypi/support/issues/8119) of storage limit.
165178

166179
So older releases need to be regularly deleted on PyPI to make room for new releases. **However, make sure to keep the latest release of each major version.**
167180

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,16 @@ Executed with 4 threads on a [*c5.2xlarge*](https://aws.amazon.com/ec2/instance-
119119

120120
Executed with CUDA 11 on a [*g5.xlarge*](https://aws.amazon.com/ec2/instance-types/g5/) Amazon EC2 instance equipped with a NVIDIA A10G GPU (driver version: 510.47.03).
121121

122+
## Contributing
123+
124+
CTranslate2 is a community-driven project. We welcome contributions of all kinds:
125+
* **New Model Support:** Help us implement more Transformer architectures.
126+
* **Performance:** Propose optimizations for CPU or GPU kernels.
127+
* **Bug Reports:** Open an issue if you find something not working as expected.
128+
* **Documentation:** Improve our guides or add new examples.
129+
130+
Check out our [Contributing Guide](CONTRIBUTING.md) to learn how to set up your development environment.
131+
122132
## Additional resources
123133

124134
* [Documentation](https://opennmt.net/CTranslate2)

0 commit comments

Comments
 (0)