Skip to content

Instantly share code, notes, and snippets.

View junfanz1's full-sized avatar
🤗
Open to Work!

Junfan Zhu junfanz1

🤗
Open to Work!
View GitHub Profile
@karpathy
karpathy / microgpt.py
Last active February 12, 2026 05:53
microgpt
"""
The most atomic way to train and inference a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@emschwartz
emschwartz / README.md
Last active February 12, 2026 05:42
The Most Popular Blogs of Hacker News in 2025

This is an OPML version of the HN Popularity Contest results for 2025, for importing into RSS feed readers.

Plug: if you want to find content related to your interests from thousands of obscure blogs and noisy sources like HN Newest, check out Scour. It's a free, personalized content feed I work on where you define your interests in your own words and it ranks content based on how closely related it is to those topics.

"""
BiLSTM-CRF的PyTorch教学实现,矩阵化版本,含详尽注释和举例
参考
- PyTorch官方教学代码: https://pytorch.org/tutorials/beginner/nlp/advanced_tutorial.html
- 矩阵化推导: https://zhuanlan.zhihu.com/p/44042528
- BiLSTM-CRF原文: https://arxiv.org/pdf/1508.01991v1.pdf
by 虎哥@知乎 [email protected] 2019/12/16
"""
import torch