🎯 Problem Description
- The current library only supports the hard-coded HarmonyGptOss format.
- Request to add dynamic encoding registration support for extending compatibility with other LLM models.
- Maintain a unified API and streaming parsing architecture.
💡 Motivation
- Increase the adoption rate and versatility of the library.
- Reuse an excellent streaming parser architecture.
- Standardize parsing logic across different LLM providers.
- Ensure backward compatibility.
🔧 Proposed Solution
- Configuration-driven system: Define encoding parameters through YAML/JSON configuration files.
- Plugin registration system: Ability to register new formats at runtime.
- Expected API: load_harmony_encoding("llama3")
📈 Benefits
- Backward compatibility
- Unified API
- Extensibility
- Friendly to community contributions
🛠️ Technical Considerations
- The existing state machine architecture is applicable to other LLM formats.
- The three-channel system can accommodate different models.
- Token-level streaming processing is universally suitable.