Skip to content

[Feature Request] Add support for dynamic encoding registration to extend harmony format to other LLM models #66

@madroidmaq

Description

@madroidmaq

🎯 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions