facebookresearch / facebookresearch/fairseq2

attribute ValueError in llama3 models export

Open
#1,517 0 comments 0 reactions 1 assignee Claimed by @YunchaoYang View on GitHub
bug
Dominant language
Python
Stars
1.1k
Forks
144
Avg merge
4d 1h
Merged PRs (30d)
1

Description

**Describe the bug:**

The export of llama3 models is broken under this version 0.8.1.

ERROR: fairseq2 - Command failed due to an unexpected error. See logged stack trace for details and file a bug report to the corresponding author.
Traceback (most recent call last):
fairseq2/models/utils/hg_export.py", line 69, in main
_run()

fairseq2/models/utils/hg_export.py", line 107, in _run
export_command.run(args.model, args.save_dir) # save_dir is Path

fairseq2/models/utils/hg_export.py", line 286, in run
self._hg_saver(tmp_save_dir, hg_state_dict, hg_config)

fairseq2/models/hg/converter.py", line 178, in save_hugging_face_model
raise ValueError(
ValueError: `transformers.LlamaConfig` does not have an attribute named rope_theta.

**Describe how to reproduce:**
Steps to reproduce the behavior. Ideally attach a minimal code sample to reproduce the described issue.

**Describe the expected behavior:**
A clear and concise description of what you expected to happen.

**Environment:**
At the very least, specify the versions of fairseq2, PyTorch, Python, and CUDA along with your operating system and, if relevant, GPU model.

**Additional Context:**
Add any other context about the bug here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.