- Select the next logical feature
- Create a task for it
- Create some initial subtasks for it
- Create a branch
- Create the module/interface/package and insert it where it needs to go
- Document it
- Write integration tests
- Ensure tests red
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from torch import manual_seed, nn, optim, randn | |
manual_seed(1234) | |
### Uncomment one of these lines -> in both cases y2 comes out the same! | |
lr = 1; mult = 1e-3; init_std = 1 / mult; | |
# lr = 1e-3; mult = 1; init_std = 1 | |
l = nn.Linear(1024, 2048, bias=False) | |
nn.init.normal_(l.weight, std=init_std) | |
model = lambda x: l(x) * mult |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Callable, List | |
import numpy as np | |
import torch | |
from torch._dynamo.backends.common import aot_autograd | |
from torch.fx.graph_module import GraphModule | |
# NOTE: requires torch >= 2.1.0 | |
def np2torch(fn: Callable) -> Callable: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""A representation of the two's complement format used for INT8.""" | |
from dataclasses import dataclass | |
from functools import total_ordering | |
from typing import Any | |
@dataclass | |
class TwosComplementFormat: | |
"""Can be used to express any two's complement signed integer.""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""A representation of the IEEE754 binary format, as well as variants for FP8.""" | |
from dataclasses import dataclass | |
from functools import total_ordering | |
from typing import Any, ClassVar | |
@dataclass | |
class IEEE754BinaryFormat: | |
"""Can be used to express any format defined in the IEEE754 standard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
class Matmul: | |
def __init__(self, batch_sz, in_dim, out_dim): | |
self.batch_sz, self.in_dim, self.out_dim = batch_sz, in_dim, out_dim | |
glorot = np.sqrt(2 / (in_dim * out_dim)) | |
self._init_w(scale=glorot) | |
def _init_w(self, scale): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ProductGrid extends StatelessWidget { | |
ProductGrid(this.userDocs); | |
List<DocumentSnapshot> userDocs; | |
IndividualProduct createProductFromSnapshot(DocumentSnapshot document) { | |
return IndividualProduct( | |
document["product_name"], | |
document["image"][0], | |
document["discounted_price"].toString() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright 2014 Jan Wolter */ | |
#include "stack.h" | |
#include "tableau.h" | |
#include "found.h" | |
#include "bouquet.h" | |
#include "solve.h" | |
#include "game.h" | |
char *gamename= "Canfield"; | |
char *gameopt= "OF"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mv .bashrc .bashrc.bak | |
git clone --bare https://github.com/thecharlesblake/cfg.git $HOME/.cfg | |
function config { | |
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@ | |
} | |
config checkout | |
config config --local status.showUntrackedFiles no | |
config submodule update --init --recursive |