Project-of-ChenShen
大模型推理优化 · 分布式系统 · 量化交易 · 创意工坊
Project of ChenShen: a study collection of LLM and systems experiments
A single repository that bundles LLM inference optimization, distributed systems, GPU efficiency work, quant trading, and an interactive story game.
What the repository gathers
Project of ChenShen is a personal study repository associated with the Department of Computer Science and Technology at Tsinghua University, and it collects many independent experiments under one roof. The README describes it less as a single program and more as a world of practice projects spanning large language model inference, distributed systems, GPU power efficiency, quantitative trading, and creative writing. The license is MIT, and the author frames the work as personal learning and experimentation. The repository is organized into clearly named subdirectories, each with its own README and code, so a visitor can explore one topic without wading through the others. Topics range from a from scratch decoder only GPT implementation to a multi asset risk parity strategy that runs locally. The breadth is unusual for an open source project, and the author is explicit that the point is reproducible benchmarks and unit tests rather than a polished product. A GitHub Actions workflow runs linting, unit tests, and a compile smoke test, and the project offers Docker and docker compose support for reproducible environments across the bundled experiments. The README also lists a set of engineering facilities such as ruff and mypy, so the mixed collection still holds to a common Python tooling standard even though the subprojects cover very different domains. The README also lists a set of engineering facilities such as ruff and mypy, so the mixed collection still holds to a common Python tooling standard even though the subprojects cover very different domains and languages.
Inference optimization and GPU efficiency
The inference optimization track is the most developed part of the collection. It contains a hand written GPT, quantization code for INT8, INT4, and FP8, speculative decoding, and continuous batching, each backed by reproducible benchmarks and unit tests. The README summarizes measured results: KV cache plus prefill and decode brings decoding complexity from quadratic to linear with a roughly 3.6 times speedup, quantization compresses model storage by four to five times with almost no perplexity loss, and speculative decoding drops target forward passes to about 0.2 per token. Continuous batching grows throughput nearly linearly with batch size. Alongside this sits GEAR, a GPU energy aware runtime that uses DVFS, power and frequency capping, and temperature protection, with the stated aim of cutting training energy cost by twenty to thirty percent. GEAR also ships an ML based efficiency predictor, a waste heat metric, and an estimate_cost.py script that models training cost for models such as DeepSeek-V3. The repo presents these as engineering measurements rather than abstract claims, with curve plots and reports included in the benchmarks directory. The companion quant trading work adds random forest and XGBoost with SHAP on the JoinQuant platform plus a local multi asset risk parity strategy with feature engineering. The companion quant trading work adds random forest and XGBoost with SHAP on the JoinQuant platform plus a local multi asset risk parity strategy with its own feature engineering and diagnostics.
Distributed systems, agents, and the narrative game
The distributed systems work builds two Raft implementations, one in Go scaled to a thousand node Multi Raft plus etcd design and one in C++17 with a standalone Asio networking layer covering leader election, log replication, persistence, and a state machine that stores mapped records. An assistant and agent subproject wraps DeepSeek with Edge TTS and the CAMEL framework behind a single command line interface, with thread safe writes and a test suite. LoRA fine tuning and DPO alignment are included as single card training scripts. The collection also holds an interactive narrative game written in HTML, CSS, and JavaScript that follows a large model becoming human across sixteen chapters, with day and night cycles and an affinity system. Six core notes tie the threads together as a knowledge base, and the roadmap marks KV cache, quantization, speculative decoding, continuous batching, paged attention, the thousand node Raft store, and GEAR as completed, with true multi machine inference still listed as a goal for later work. The same README lists planned items such as unified quant strategy engineering and more story chapters, which shows the collection is still growing rather than frozen at a release. The same README lists planned items such as unified quant strategy engineering and more story chapters, which shows the collection is still growing rather than frozen at a single release point.
Editorial conclusion
Project of ChenShen is published under the MIT license and, per its README, originated from the Department of Computer Science and Technology at Tsinghua University.
Community notes