This file contains 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 | |
BATCH = 4 | |
EMB_DIM = 256 | |
HEADS = 8 | |
Q_TOKENS = 512 | |
KV_TOKENS = 16384 | |
q_proj = torch.nested.nested_tensor([torch.zeros(HEADS, Q_TOKENS // (i+1), EMB_DIM) for i in range(BATCH)], dtype=torch.half, device="cuda") | |
k_proj = torch.nested.nested_tensor([torch.zeros(HEADS, KV_TOKENS // (i+1), EMB_DIM) for i in range(BATCH)], dtype=torch.half, device="cuda") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
#include <Servo.h> | |
#define MAX_SIGNAL 2000 | |
#define MIN_SIGNAL 700 | |
#define MOTOR_PIN 9 | |
Servo motor; | |
unsigned long time; |
This file contains 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 web | |
urls = ( | |
'/(.*)', 'Service' | |
) | |
app = web.application(urls, globals()) | |
class Service: | |
def GET(self, name): | |
web.header('Access-Control-Allow-Origin', '*') |
This file contains 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
const char* kernel_source[] = | |
{ | |
"sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE | \n", | |
" CLK_ADDRESS_NONE | \n", | |
" CLK_FILTER_NEAREST; \n", | |
"__kernel void kernel_bc(__read_only image2d_t in, \n", | |
" __write_only image2d_t out, \n", | |
" float brightness, \n", | |
" float contrast) \n", | |
"{ \n", |