Skip to content

refactor(examples): Consolidate and clean up example scripts #148

Closed

Description

@m96-chan

Problem

Multiple large example files with overlapping functionality:

  • examples/chat_cli.py (990 lines)
  • examples/chat_cli_thinking.py (714 lines)
  • examples/chat_cli_moe.py (572 lines)
  • examples/demo_v02_full.py (633 lines)
  • examples/demo_v0210.py (593 lines)

Issues

  • Duplicated code across examples
  • Version-specific demos become stale
  • Hard to maintain

Proposed Structure

examples/
├── chat/
│   ├── basic.py         (simple chat)
│   ├── streaming.py     (streaming output)
│   ├── thinking.py      (thinking mode)
│   └── moe.py           (MoE models)
├── inference/
│   ├── benchmark.py     (performance testing)
│   └── batch.py         (batch inference)
├── audio/
│   ├── stt.py           (speech-to-text)
│   └── realtime.py      (real-time processing)
└── common/
    └── utils.py         (shared utilities)

Benefits

  • No duplicated code
  • Clear categorization
  • Easier to maintain
  • Remove stale version-specific demos

Activity

  1. m96-chan commented on Dec 30, 2025

    @m96-chan
    OwnerAuthor

    Completed in PR #168

  2. added a commit that references this issue on Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions