Skip to content

Instantly share code, notes, and snippets.

@kstoneriv3
kstoneriv3 / optimizers.py
Last active June 25, 2025 02:34
An Optax implementation of Grams, c-Adamw, c-Lion optimizers
import functools
import warnings
from collections.abc import Callable
from typing import Any, NamedTuple, Optional, Union
import chex
import jax
import jax.numpy as jnp
import optax.tree
from jax import nn
#!/usr/bin/env python3
import subprocess
import os
import sys
def launch():
# Ensure python binary and script path are correct
cmd = [sys.executable, 'telnet_shell.py']
# start_new_session=True → child is in a new session group
# stdout/stderr can go to log files or /dev/null