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 "sdspi/emmcdrv.h" | |
#include "xparameters.h" | |
#include "xstatus.h" | |
#include "xpm_counter.h" | |
#include <stdio.h> | |
#include "xil_cache.h" | |
#include "pl_dma.h" | |
#define SDIO_BASE_ADDR XPAR_SDIO_TOP_0_BASEADDR | |
#define SDIO_DMA |
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
#!/usr/bin/env python | |
""" | |
Calculate KL-divergence of two models output logits on data set. | |
First call the program with write_path and text_path using fp16 model. | |
./llama_kl.py -m <fp16 model> -t <wiki.test.raw> -w <logits.gz> | |
This writes logits to file. Then call the program with quantized model with read path | |
./llama_kl.py -m <quantized model> -r <logits.gz> | |
KL-divergence to the first run is calculated. | |
See ./llama_kl.py --help for more options. | |
""" |
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
#!/usr/bin/python3 | |
from os import path | |
import urllib.request | |
base_url = 'https://www.tcec-chess.com/json/TCEC_Season_17_-_Superfinal_{}.pgjson' | |
games = list(range(1, 17+1)) | |
for game in games: | |
url = base_url.format(game) | |
basename = url.split('/')[-1] |