Skip to content

Commit

Permalink
fix gguf-py: Conversion error when multiple licenses are configured (g…
Browse files Browse the repository at this point in the history
…gerganov#9807)

* fix general.license list to str

* fix join license list

---------

Co-authored-by: momonga <[email protected]>
  • Loading branch information
mmngays and mmnga authored Nov 24, 2024
1 parent 55ed008 commit 96fa2c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gguf-py/gguf/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,10 @@ def set_gguf_meta_model(self, gguf_writer: gguf.GGUFWriter):
gguf_writer.add_size_label(self.size_label)

if self.license is not None:
gguf_writer.add_license(self.license)
if isinstance(self.license, list):
gguf_writer.add_license(",".join(self.license))
else:
gguf_writer.add_license(self.license)
if self.license_name is not None:
gguf_writer.add_license_name(self.license_name)
if self.license_link is not None:
Expand Down

0 comments on commit 96fa2c5

Please sign in to comment.