name: tufte-viz description: | Ideate and critique data visualizations using Edward Tufte's principles from "The Visual Display of Quantitative Information." Use this skill when: (1) Designing new data visualizations or charts (2) Critiquing or improving existing visualizations (3) Reviewing dashboards or reports for graphical integrity (4) Deciding between visualization approaches (5) Reducing chartjunk or improving data-ink ratio (6) Planning small multiples or high-density displays
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
| # the attention layer from this benchmark is from modded-nanogpt, MIT-licensed | |
| # https://github.com/KellerJordan/modded-nanogpt | |
| from typing import Callable, Optional | |
| import math | |
| from pathlib import Path | |
| from dataclasses import dataclass | |
| from functools import partial | |
| import torch | |
| from torch import nn, Tensor, FloatTensor, IntTensor | |
| import torch.nn.functional as F |
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 argparse | |
| import time | |
| from typing import Type | |
| import torch | |
| import torch.nn.functional as F | |
| import torch._inductor.config | |
| torch._inductor.config.triton.multi_kernel = True |
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 torch | |
| from torch import nn | |
| from torch.distributed.tensor.placement_types import Replicate, Shard | |
| from torch.testing._internal.distributed.fake_pg import FakeStore | |
| import torch.distributed as dist | |
| from torch.distributed.device_mesh import init_device_mesh | |
| from torch.distributed.tensor import DTensor, Replicate | |
| world_size = 4 |
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 __future__ import annotations | |
| """ | |
| Fused Attention | |
| =============== | |
| This is a Triton implementation of the Flash Attention v2 algorithm from Tri Dao (https://tridao.me/publications/flash2/flash2.pdf) | |
| Credits: OpenAI kernel team | |
| Extra Credits: |
This collection is limited to only include the reports that were submitted as security vulnerabilities to the curl bug-bounty program on Hackerone.
Several other issues not included here are highly suspcious as well.
- [Critical] Curl CVE-2023-38545 vulnerability code changes are disclosed on the internet. #2199174
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
| """ | |
| Proof-of-concept for NAT traversal and low-latency communication over QUIC | |
| between two Modal containers. | |
| In theory this could be used to establish a low-latency p2p connection between a | |
| service running outside Modal and a Modal GPU container, e.g. for real-time | |
| inference on a video stream. Please let us know if you try it! | |
| Usage: | |
| > modal run modal_quic_hole_punch.py |
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 os | |
| import sys | |
| with open(sys.argv[0]) as f: | |
| code = f.read() # read the code of this file ASAP, for logging | |
| import uuid | |
| import time | |
| import glob | |
| import subprocess | |
| import contextlib | |
| from dataclasses import dataclass |
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
| # https://x.com/shxf0072/status/1873038335427658011 | |
| import torch | |
| import torch.nn as nn | |
| import torch.nn.functional as F | |
| from dataclasses import dataclass | |
| from collections import OrderedDict | |
| from ohara.modules.norm import RMSNorm |
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 Tuple | |
| import torch | |
| from torch import nn, Tensor | |
| import torch.nn.functional as F | |
| from einops import rearrange | |
| from .modules import HiFiGANEncoder, HiFiGANDecoder, GroupFiniteScalarQuantizer | |
| class AudioCodecModel(nn.Module): |
NewerOlder