feat: enhance serving functionality and add comprehensive examples

- Improve API server with better error handling and response formatting
- Enhance CLI with additional options for DiT stages and configuration
- Add comprehensive examples in examples/basic/ including:
  - API client with health checks and text generation
  - Docker setup and usage examples
  - Simple usage patterns for different scenarios
- Add utility scripts for model downloading and Docker setup
- Update documentation with implementation details and testing guidelines
- Fix configuration validation issues in OmniLLM
- Improve stage configuration handling for AR and DiT stages
- Add proper error handling and fallback mechanisms

Tested with Qwen3-0.6B model:
- Server starts successfully on port 8000
- Health and info endpoints working correctly
- Text generation with various parameters functioning
- API client examples working as expected
- CLI help and configuration options working properly
This commit is contained in:
hsliu committed 2025-09-26 15:47:55 +08:00
1 parent 51d2570464
commit afe5c2692c
16 files changed
+1051 -134

No files matched your search

+2 -2
View File
@@ -373,7 +373,7 @@ class TestVLLMIntegration:
OmniStageConfig(
stage_id=0,
engine_type="AR",
model_path="microsoft/DialoGPT-small", # Small test model
model_path="Qwen/Qwen3-0.6B", # Small test model
input_modalities=["text"],
output_modalities=["text"]
)
@@ -443,7 +443,7 @@ class TestFullPipeline:
OmniStageConfig(
stage_id=0,
engine_type="AR",
model_path="microsoft/DialoGPT-small",
model_path="Qwen/Qwen3-0.6B",
input_modalities=["text"],
output_modalities=["text"]
),