Skip to content

Instantly share code, notes, and snippets.

View knyazer's full-sized avatar
🐈‍⬛

Roman Knyazhitskiy knyazer

🐈‍⬛
View GitHub Profile
@knyazer
knyazer / miral-labs-cla.md
Last active June 20, 2026 19:10
Mirai Labs CLA

Mirai Labs Individual Contributor License Agreement

In order to clarify the intellectual property license granted with Contributions from any person or entity, Mirai Labs must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of Mirai Labs; it does not change your rights to use your own Contributions for any other purpose.

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Mirai Labs. Except for the license granted herein to Mirai Labs and recipients of software distributed by Mirai Labs, You reserve all right, title, and interest in and to Your Contributions.

  1. Definitions.

"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with Mirai Labs. For legal entities, the entity making a Contr

@knyazer
knyazer / distill_dataset.py
Last active May 12, 2026 15:08
interface for distillation dataset
class PromptStore:
path: Path
name: str # dataset name
hash: str # block-wise hash of the mixture or smth like that
@classmethod
def init(cls, path: Path):
# load the dataset, dump into the path with some mixing
# or not load it, but just reuse from the path + some heuristic way to check that metadata matches remote
@eqx.filter_jit
def _make_chunks(
self,
token_ids: Int[Array, "batch tokens"],
lengths_without_padding: Int[Array, " batch"] | None,
chunk_size: int,
) -> Chunk:
batch_size, sequence_length = token_ids.shape
if lengths_without_padding is None:
@knyazer
knyazer / log.txt
Created January 23, 2026 21:10
blowing on 3.12.12
Using CPython 3.12.12
Removed virtual environment at: .venv
Creating virtual environment at: .venv
Installed 158 packages in 119ms
===================================================== test session starts =====================================================
platform linux -- Python 3.12.12, pytest-9.0.1, pluggy-1.6.0
rootdir: /home/knyaz/workspace/lalamo
configfile: pyproject.toml
plugins: anyio-4.11.0, hypothesis-6.150.0, jaxtyping-0.3.3, xdist-3.8.0, env-1.2.0
collected 163 items
@knyazer
knyazer / add_to_fish_config.fish
Last active January 21, 2025 21:51
Bringing AI to Git commit.
function gcm
# Check if llm is installed, if not, install it
if not type -q llm
echo "'llm' is not installed. Attempting to install it using pip..."
if pip install llm
echo "'llm' installed successfully."
else
echo "Failed to install 'llm'. Please install it manually and try again."
return 1
end