Skip to content

Add export of KerasHub pre-sets to Huggingface format #2330

@gmarchetti2020

Description

@gmarchetti2020

Is your feature request related to a problem? Please describe.

A LLM fine-tuned with Keras3 cannot be served on any modern engine such as vllm, hexllm, sglang, etc because they all require Huggingface format.

Describe the solution you'd like

A model.export_to_hf(...) method that saves the fine-tuned preset to huggingface/safetensor format (not just an upload to the HF hub).

Describe alternatives you've considered

For Gemma 1 you already have a utility tools/gemma/export_gemma_to_hf.py. It does not work as intended for Gemma2 and 3 is not supported at all. we'd like such a tool for all supported models.
We have already considered maxtext, but it is unnecessarily complicated

Additional context

Metadata

Metadata

Assignees

Labels

GemmaGemma model specific issuestype:featureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions