Measure Zero


  • About

  • Quotes

  • Notes

  • Sitemap

  • Search

难倒各路大模型的两道简单 SQLite 问题

2025-05-05 | ~ | Tech

问题描述以及示例 prompt 如下


你是 SQLite 专家, 请完成下面两个问题.

  1. 用 SQLite 写一个 query, 根据 “now” 获得当地时间今日零点的 unix 时间戳. 注: “当地” 指执行 SQL 的机器的系统时区, “今日” 指当地日期的今日.

例: 若 now 为 ‘2025-05-05 04:00:00+08:00’, 则返回 ‘2025-05-05 00:00:00+08:00’. (假设当地时区为 UTC+8)

  1. 用 SQLite 写一个 query, 根据 “now” 获得上周的周一的日期. 假设周一为一周的开始, 全程只在 UTC 时间考虑问题 (不用考虑时区).

例: 若 now 为 ‘2025-05-05’ 周一, 则返回 ‘2025-04-28’. 若 now 为 ‘2025-05-04’ 周日, 则返回 ‘2025-04-21’.

Read more »

LightRAG 源码简要分享

2025-01-21 | ~ | Machine Learning

Guo, Z., Xia, L., Yu, Y., Ao, T., & Huang, C. (2024). Lightrag: Simple and fast retrieval-augmented generation.

大体流程:

  • 用 LLM 提取 chunks 中的实体和关系, 并存成一个图
  • 用 LLM 从 query 中提取关键词, 根据关键词召回实体或关系, 再找到最相关的 chunks, 最后把所有东西都拼起来给 LLM 输出答案
Read more »

ModernBERT

2024-12-24 | ~ | Machine Learning
  • Warner, B., Chaffin, A., Clavié, B., Weller, O., Hallström, O., Taghadouini, S., … & Poli, I. (2024). Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inference. arXiv preprint arXiv:2412.13663.
  • 2024-12-19 Hugging Face Finally, a Replacement for BERT

如同字面意思, 更现代的 BERT, 更快更强而且 context length 拓展到 8k tokens, 也是首个在训练数据中加入大量代码数据的 encoder-only 模型. BERT 系模型对比 LLM 的优势是快, 便宜, 而且很多任务适用 encoder-only 结构.

Read more »

LoRA 变体

2024-08-18 | ~ | Machine Learning
Read more »

读文章: Understanding Pins through keyword extraction

2024-01-10 | ~ | Machine Learning

挺久之前读的, 补个笔记. 传统机器学习. 从帖子的多个文本来源抽取候选标签, 然后用分类模型判断标签是否与帖子相关. 没有用到图片信息 (除了从图中抽取文字).

  • 2019-08 Understanding Pins through keyword extraction
Read more »

LLM-based Text2SQL

2023-12-25 | ~ | Machine Learning

Gao, D., Wang, H., Li, Y., Sun, X., Qian, Y., Ding, B., & Zhou, J. (2023). Text-to-sql empowered by large language models: A benchmark evaluation. arXiv preprint arXiv:2308.15363.

个人总结: 一篇 LLM 在 Text2SQL 数据集上的 prompt engineering 的实验报告. 在文中评测的两个数据集中效果是开源方案中最好的. 提出的 prompt 方案 DAIL-SQL 融合了现有的几种 RAG 方法.

Read more »

读论文: Direct Fact Retrieval from Knowledge Graphs without Entity Linking

2023-12-04 | ~ | Machine Learning

Baek, J., Aji, A. F., Lehmann, J., & Hwang, S. J. (2023). Direct Fact Retrieval from Knowledge Graphs without Entity Linking. arXiv preprint arXiv:2305.12416.

简单粗暴的召回 + 排序. 流程是标准的, 粗暴点 (“创新点”) 在于直接输入句子与知识库中的东西算相似度. 两句话讲完.

Read more »

膝盖和肩膀如何工作

2023-12-03 | ~ | Miscellanea

参考 How does the knee work? 与 How does the shoulder work?, 非常简略. 更多简短补充可以看视频 膝关节结构讲解 与 肩关节解剖结构讲解.

Read more »

Notes on Introduction to Deep Reinforcement Learning

2023-11-25 | ~ | Machine Learning

材料初步考察

  • 蘑菇书 的形式和编排结构很好, 但数学部分糟糕 (第二章开头就一堆错误, 反正我读不下去).
  • Sutton 的经典 Reinforcement Learning: An Introduction 2022 年的第二版. 主要是 value-based, 而非当今流行的 policy-based (书中只有二十几页描述). 没读.
  • HuggingFace 也有个 deep-rl-class. 过于简化了而且比较啰嗦, 但是附方便的代码实践.
  • OpenAI 的 Spinning Up 简单介绍了 policy gradient.
  • CS 285 at UC Berkeley Deep Reinforcement Learning 比较现代. 看了前面一部分. (视频没看, 直接看的 slides.)
  • 其他可以参考 Reinforcement Learning Resources — Stable Baselines3.

下面是简要的笔记: 统一了记号, 自己简明的证明和 PyTorch 实现, 还有杂七杂八的补充.

目标

Which algorithms? You should probably start with vanilla policy gradient (also called REINFORCE), DQN, A2C (the synchronous version of A3C), PPO (the variant with the clipped objective), and DDPG, approximately in that order. The simplest versions of all of these can be written in just a few hundred lines of code (ballpark 250-300), and some of them even less (for example, a no-frills version of VPG can be written in about 80 lines). 来自 Spinning Up.

先搞清楚最流行的方法. 至于具体应用场景… 呃… 我没有需求, 就是单纯玩玩而已, 所以不会特别深入, 看多少算多少.

Read more »

Heavily modded XCOM2

2023-10-03 | ~ 2023-12-01 | Games

写得一坨了, 只能自己看看了, 很多看过的材料没贴上来. 目前稳定 250 mod.

Read more »
1 2 … 18
Shiina

Shiina

知乎 豆瓣 bangumi Instagram Weibo
Creative Commons
RSS
© 2019 - 2025   Shiina   CC BY-NC-ND 4.0
RSS  
Powered by Jekyll
 
Theme NexT.Mist