Skip to content

Instantly share code, notes, and snippets.

View nalzok's full-sized avatar

Qingyao Sun nalzok

  • Cornell University
  • Ithaca, NY
View GitHub Profile
from time import perf_counter
import torch
from flash_attn_time import benchmark_one
from huggingface_hub import snapshot_download
from huggingface_hub.utils._errors import RepositoryNotFoundError
def benchmark():
for llama in (1, 2):
------------
-- Set up --
------------
.print ''
.print '[Set up]'
.open bmk.db
DROP TABLE IF EXISTS candidates;

Keybase proof

I hereby claim:

  • I am nalzok on github.
  • I am nalzok (https://keybase.io/nalzok) on keybase.
  • I have a public key ASAMkvIz91IuWXFkdNjPM60KoPTc6dXVpYy6ygbLHJBQLgo

To claim this, I am signing this object:

@nalzok
nalzok / .emacs
Last active March 2, 2019 03:38
Simple Emacs configuration
;;; Face
(set-frame-font "Hack Nerd Font 16" nil t)
(add-to-list 'default-frame-alist '(height . 24))
(add-to-list 'default-frame-alist '(width . 80))
;;; Line number
(add-hook 'prog-mode-hook 'linum-mode)
;;; Setup MELPA
(require 'package)
@nalzok
nalzok / intro_se.md
Last active August 19, 2017 03:37
Introducing Stack Exchange

Stack Exchange | 高质量Q&A网站

  • SE目前由169个专业板块组成
    • Mathematics | 数学
    • Stack Overflow | 编程
    • English Language Learners | 英语
    • Cross Validated | 统计
    • Economics | 经济
    • Personal Finance & Money | 理财
  • 摄影、音乐、烹饪、科幻&魔幻、酿酒、伊斯兰教……
<form action="" method="post">
<input type="hidden" name="csrfmiddlewaretoken" value="WjfP52q0v6yO9ME0Ookn1RvXeM93MMiYcXOP9D4KwatNXL0u9E5nqjj4nwirpz0O">
<table>
<tbody><tr><th><label for="id_due_back">Renewal date:</label></th><td><input id="id_due_back" name="due_back" type="text" value="2017-04-15"><br><span class="helptext">Enter a date between now and 4 weeks (default 3).</span></td></tr>
</tbody></table>
<input type="submit" value="Submit">
</form>
@nalzok
nalzok / ex2.3-1.scm
Created February 18, 2017 14:02
My solution to SICP exercise 2.3
;;; Exercise 2.3 part 1
;;; ===================
(define (peri-rect r)
(* 2 (+ (length-rect r)
(width-rect r))))
(define (area-rect r)
(* (length-rect r)
(width-rect r)))
@nalzok
nalzok / *Messages*
Created February 13, 2017 13:32
Full output of the *Messages* buffer
Loading /Users/sunqingyao/.emacs.d/core/core-load-paths.el (source)...done
Loading /Users/sunqingyao/.spacemacs...done
Setting the font...
Open the quickhelp.
Loading /Users/sunqingyao/.emacs.d/layers/+completion/auto-completion/packages.el (source)...done
Loading /Users/sunqingyao/.emacs.d/layers/+lang/emacs-lisp/packages.el (source)...done
Loading /Users/sunqingyao/.emacs.d/layers/+completion/helm/packages.el (source)...done
Loading /Users/sunqingyao/.emacs.d/layers/+os/osx/packages.el (source)...done
Loading /Users/sunqingyao/.emacs.d/layers/+lang/scheme/packages.el (source)...done
Loading /Users/sunqingyao/.emacs.d/layers/+tools/shell/packages.el (source)...done
@nalzok
nalzok / .spacemacs
Created February 13, 2017 12:01
The dotfile being used while this error occurs
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@nalzok
nalzok / ex2.42.scm
Created January 22, 2017 12:46
My solution to SICP exercise 2.42 - Eight-queens puzzle
;;; Exercise 2.42
;;; =============
(define (enumerate-interval low high)
(if (> low high)
'()
(cons low (enumerate-interval (+ low 1) high))))
(define (accumulate op initial sequence)
(if (null? sequence)