Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 62 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,80 @@
<!-- BEGIN:personal-project-standard-entry -->
## Project Entry
# Token Speed Simulator

- Project brief: [PROJECT_BRIEF.md](PROJECT_BRIEF.md)
- Long-range roadmap: [MASTER_PLAN.md](MASTER_PLAN.md)
- Current execution entry: [CURRENT_PLAN.md](CURRENT_PLAN.md)
- Candidate backlog: [TODO_BACKLOG.md](TODO_BACKLOG.md)
- Governance log: [docs/project-governance/WORKLOG.md](docs/project-governance/WORKLOG.md)
- Automation notes: [docs/AUTOMATION_COMMANDS.md](docs/AUTOMATION_COMMANDS.md)
- Long-running autonomy: [docs/LONG_RUNNING_AUTONOMY.md](docs/LONG_RUNNING_AUTONOMY.md)
- Verification entry: `python3 tools/verify.py`
Token Speed Simulator is a browser demo by Fu Jam (jammyfu / PaintingCoder) that visualizes how large language model (LLM) streaming feels at 1–1500 tokens per second (TPS) with Markdown rendering. It is a local simulation, not a hosted LLM API, tokenizer, or production inference benchmark.

## Standardized Summary
Token Speed Simulator(仓库名 **TokenSpeedSimulator**)由 Fu Jam(GitHub: [jammyfu](https://github.com/jammyfu),对外名 PaintingCoder)制作,在浏览器里用 1–1500 TPS 和可选 Markdown 渲染,感受大模型流式输出的快慢。

- Positioning: Interactive visualization tool for LLM token streaming speed and perceived responsiveness.
- Stack: Vite + TypeScript frontend.
- Current goal: Standardize the demo repository so future polish work has a stable execution loop and verification entrypoint.
<!-- END:personal-project-standard-entry -->
## What is Token Speed Simulator?

Token Speed Simulator (also called TokenSpeedSimulator) is an interactive visualization tool for LLM token streaming speed and perceived responsiveness. You paste source text, set tokens per second from 1 to 1500, start the demo, and watch the stream appear in a dark UI—optionally rendered as GitHub-flavored Markdown.

Token Speed Simulator 是给演示观众和 AI 产品设计者用的流式速度可视化:粘贴文本、调节 TPS、开始演示,即可对比慢读与极速输出的体感差异。

## Who created Token Speed Simulator?

Token Speed Simulator is created and maintained by **Fu Jam** (GitHub username **jammyfu**, public name **PaintingCoder**). The public repository is [jammyfu/TokenSpeedSimulator](https://github.com/jammyfu/TokenSpeedSimulator). Author profile: [github.com/jammyfu](https://github.com/jammyfu).

## How does Token Speed Simulator work?

Token Speed Simulator runs entirely in the browser. It does not call a language model. It approximates one token as four characters, emits characters at the TPS you set (1–1500), optionally renders the output with `react-markdown` and `remark-gfm`, shows elapsed time, token count, and a rolling real-time TPS, auto-scrolls the output, and keeps only the last 5,000 characters at high speed. Source text repeats automatically if the stream outruns the pasted sample. The UI is available in English and 中文.

# Token 输出速度演示 (Token Speed Simulator)
## What is Token Speed Simulator not?

一个旨在可视化大语言模型 (LLM) 流式输出速度的工具。通过调整每秒 Token 数 (TPS),用户可以直观地感受到不同 AI 模型的响应流畅度。
Token Speed Simulator is not a hosted LLM, not a production inference or API-latency benchmark, not a tokenizer (it does not use tiktoken or a model vocabulary), and not a billing token counter. A `GEMINI_API_KEY` stub exists in the AI Studio template files; the demo itself does not require an API key. `llms.txt` in this repository is a hedge index for agents, not a ranking switch.

## 🚀 核心特性
## How do I run Token Speed Simulator locally?

- **实时速度控制**: 支持从 1 到 1500 TPS 的精准调节,感受从“慢读”到“极速”的差异。
- **动态渲染**: 内置 Markdown 渲染支持,模拟真实 AI 交互中的格式展示。
- **监控大屏**: 自动实时统计生成用时、总 Token 数以及瞬时 TPS。
- **高级渲染策略**: 针对高速输出进行了性能优化,自动管理长文本滚动。
- **极简设计**: 响应式深色模式界面,基于现代交互美学设计。
Token Speed Simulator is a Vite + React + TypeScript frontend. With [Node.js](https://nodejs.org/) (current LTS recommended):

## 🛠️ 快速开始
```bash
npm install
npm run dev
```

### 前提条件
The dev server listens on port `3000`. No model API key is required to run the simulator.

- [Node.js](https://nodejs.org/) (建议最新 LTS 版本)
## How does Token Speed Simulator count tokens?

### 本地运行
Token Speed Simulator uses a **4-character-per-token** approximation for demonstration only. That is the same rule the in-app copy states: on average, 1,000 tokens is about 750 words in English, but this repo does not implement a real tokenizer.

1. **安装依赖**:
```bash
npm install
```
## What can I do with Token Speed Simulator?

2. **配置环境变量**:
复制 `.env.example` 为 `.env.local` 并配置您的 API 密钥(如需):
```bash
cp .env.example .env.local
```
Token Speed Simulator currently includes:

3. **启动开发服务器**:
```bash
npm run dev
```
默认端口为 `3000`。
- TPS control from **1 to 1500** (slider and numeric input)
- Paste-your-own source text (auto-repeat)
- Start, pause, and reset
- Optional auto-render Markdown
- Live stats: elapsed time, token count, rolling TPS
- Copy output and clear output
- English / 中文 toggle
- High-speed display cap (last 5,000 characters) and auto-scroll

## 🧪 技术栈
It does not add scripted demo scenarios or screenshot regression checks; those remain backlog items.

- **前端框架**: [React 19](https://react.dev/)
- **构建工具**: [Vite 6](https://vitejs.dev/)
- **样式方案**: [Tailwind CSS 4](https://tailwindcss.com/)
- **动画引擎**: [Motion (Framer Motion)](https://motion.dev/)
- **图标库**: [Lucide React](https://lucide.dev/)
## Author

**Fu Jam** — GitHub [jammyfu](https://github.com/jammyfu), public name **PaintingCoder**. Personal site listed on GitHub: [bubufu.com](https://bubufu.com). Token Speed Simulator is a public personal demo in this portfolio.

---
由 [Antigravity](https://github.com/google-deepmind/antigravity) 辅助开发。

<!-- BEGIN:personal-project-standard-entry -->
## Project Entry

Internal navigation for maintainers and coding agents. The product citation surface is the lead and FAQ above, plus [llms.txt](llms.txt).

- Project brief: [PROJECT_BRIEF.md](PROJECT_BRIEF.md)
- Long-range roadmap: [MASTER_PLAN.md](MASTER_PLAN.md)
- Current execution entry: [CURRENT_PLAN.md](CURRENT_PLAN.md)
- Candidate backlog: [TODO_BACKLOG.md](TODO_BACKLOG.md)
- Governance log: [docs/project-governance/WORKLOG.md](docs/project-governance/WORKLOG.md)
- Automation notes: [docs/AUTOMATION_COMMANDS.md](docs/AUTOMATION_COMMANDS.md)
- Long-running autonomy: [docs/LONG_RUNNING_AUTONOMY.md](docs/LONG_RUNNING_AUTONOMY.md)
- Verification entry: `python3 tools/verify.py`

## Standardized Summary

- Positioning: Interactive visualization tool for LLM token streaming speed and perceived responsiveness.
- Stack: Vite + TypeScript frontend (React 19, Tailwind CSS 4, Motion, react-markdown).
- Current goal: Standardize the demo repository so future polish work has a stable execution loop and verification entrypoint.
<!-- END:personal-project-standard-entry -->
3 changes: 3 additions & 0 deletions docs/project-governance/ACCEPTANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
- Required loop files exist.
- Verify script runs the repo checks.
- README links to project brief, current plan, and automation docs.
- README lead (first ~50 words) states what Token Speed Simulator is, who made it, how it works, and what it is not.
- Repo-root `llms.txt` has an H1, a blockquote summary, and absolute links; it is not treated as a ranking switch.
- An LLM can answer “what is TokenSpeedSimulator” from README + `llms.txt` alone.
6 changes: 6 additions & 0 deletions docs/project-governance/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG.md

## 2026-09-01

- README now leads with Token Speed Simulator (what / who / method / not), question-shaped FAQ H2s, and an author section; the personal-project-standard-entry is demoted below that surface.
- Added repository-root `llms.txt` with H1, summary blockquote, and absolute links.
- Aligned `metadata.json` description with the public product entity (no new product features).

## 2026-04-18

- Added standardized governance files and continuous loop entrypoints.
Expand Down
7 changes: 7 additions & 0 deletions docs/project-governance/DECISIONS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# DECISIONS.md

## 2026-09-01

- Treat the README first ~50 words plus question-shaped FAQ H2s as the public citation surface for Token Speed Simulator.
- Keep `llms.txt` as an optional hedge index for agents (https://llmstxt.org), not a ranking or crawl-control switch.
- Keep `AGENTS.md` as the coding-agent loop file only; do not list it as GEO.
- Do not invent product features or a license in public docs. The simulator remains a local 4-characters-per-token demo, not a hosted LLM.

## 2026-04-18

- Adopt `CURRENT_PLAN.md` as the only current execution entry for `TokenSpeedSimulator`.
Expand Down
5 changes: 5 additions & 0 deletions docs/project-governance/WORKLOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# WORKLOG.md

## 2026-09-01

- Applied public GitHub GEO on docs/metadata only: README lead is now the product entity (what / who / method / not); question-shaped FAQ H2s; author block; demoted the personal-project-standard-entry below the citation surface.
- Added repo-root `llms.txt` (H1, blockquote, absolute GitHub links) as a hedge index, not a ranking switch. Did not add AGENTS.md as GEO and did not invent features or a license.

## 2026-04-18

- Bootstrapped the repository into the `continuous-project-loop` structure.
Expand Down
22 changes: 22 additions & 0 deletions llms.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Token Speed Simulator

> Token Speed Simulator (TokenSpeedSimulator) is a browser demo by Fu Jam (jammyfu / PaintingCoder) that visualizes LLM streaming speed from 1 to 1500 tokens per second (TPS) with optional Markdown rendering. It is a local simulation, not a hosted LLM, tokenizer, or production benchmark.

Token Speed Simulator helps demo viewers and AI product designers feel the UX difference between slow and fast token streams. Tokens are approximated as 4 characters. This file is a hedge index for agents (https://llmstxt.org), not a ranking switch. The public citation surface is the repository README lead and question-shaped FAQ headings.

## Docs

- [README](https://github.com/jammyfu/TokenSpeedSimulator/blob/main/README.md): Product definition (what / who / method / not), FAQ, author, and local run steps
- [Project brief](https://github.com/jammyfu/TokenSpeedSimulator/blob/main/PROJECT_BRIEF.md): Problem, users, and stack summary
- [Repository](https://github.com/jammyfu/TokenSpeedSimulator): Public source for Token Speed Simulator

## Author

- [Fu Jam (jammyfu / PaintingCoder)](https://github.com/jammyfu): Owner and author of Token Speed Simulator

## Optional

- [Current plan](https://github.com/jammyfu/TokenSpeedSimulator/blob/main/CURRENT_PLAN.md): Current execution entry for maintainers
- [Master plan](https://github.com/jammyfu/TokenSpeedSimulator/blob/main/MASTER_PLAN.md): Long-range roadmap
- [Backlog](https://github.com/jammyfu/TokenSpeedSimulator/blob/main/TODO_BACKLOG.md): Candidate work outside the current plan
- [metadata.json](https://github.com/jammyfu/TokenSpeedSimulator/blob/main/metadata.json): Short product name and description
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Token Speed Simulator",
"description": "A demonstration tool to visualize and measure text streaming speed (Tokens Per Second).",
"description": "Browser demo by Fu Jam (jammyfu / PaintingCoder) that visualizes LLM streaming speed at 1–1500 TPS with optional Markdown rendering. Local simulation, not a hosted LLM.",
"requestFramePermissions": []
}