본문 바로가기

Error and Solve

[에러 해결] Value error, The checkpoint you are trying to load has model type `gpt_oss` but Transformers does not recognize this architecture.

반응형

 

 

에러 : Value error, The checkpoint you are trying to load has model type `gpt_oss` but Transformers does not recognize this architecture.

 

 

 

ValueError: 'aimv2' is already used by a Transformers config, pick another name.

ValueError: 'aimv2' is already used by a Transformers config, pick another name.

 

처음 vllm serve를 했을 때 aimv2 already used error가 떴었다 

 

 

이를 해결하기 위해 transformers를 4.57.3에서 

4.54.0으로 다운그레이드 했었다 

 

https://github.com/vllm-project/vllm-ascend/issues/2046

 

pip install "transformers<4.54.0"

pip install "transformers<4.54.0"

 

 

하지만 또 다른 에러가 떴다 

 

 

 

 

  Value error, The checkpoint you are trying to load has model type `gpt_oss` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.

 

  Value error, The checkpoint you are trying to load has model type `gpt_oss` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.

 

 

4.54.0은 gpt-oss를 쓰기에는 또 버전이 낮은 편이었다. 

 

 

 

해결: 패키지 호환

 

 

다양한 조합을 진행해본 결과 호환되는 패키지를 찾았다 

 

torch 2.9.0 
transformers 4.57.3
vllm 0.12.0

torch 2.9.0 

transformers 4.57.3

vllm 0.12.0

 

 

 

그래도 해결이 안된다면 다른 방법은 아래 순서대로 설치를 진행한다.

 

 

1. pip install -r requirements.txt
datasets
pandas
numpy
sentence-transformers
torch
transformers
tqdm 
openai>=1.12.0
pydantic>=2.0.0
python-dotenv>=1.0.0
tqdm>=4.66.0
pandas>=2.0.0
ollama 
structured-logprobs

 

먼저

위의 패키지를 requirements.txt에 저장하고 

pip install -r requirements.txt로 깐다. 

 

 

 

2. curl -fsSL https://ollama.com/install.sh | sh

 

그 다음 ollama를 깐다 

 

 

3. pip install vllm 

마지막으로 vllm을 설치한다. 

 

 

이 순서대로 실행하면 보통 잘 됐었다. 

 

python version 3.12에서 진행했었다.

 

 

 

 

 


 

Reference

 

 

https://github.com/vllm-project/vllm-ascend/issues/2046

 

[doctest]: ValueError: 'aimv2' is already used by a Transformers config, pick another name · Issue #2046 · vllm-project/vllm-a

Your current environment https://github.com/vllm-project/vllm-ascend/actions/runs/16539763269/job/46779322335 🐛 Describe the bug Traceback (most recent call last): File "/vllm-workspace/vllm-ascend...

github.com

 

 

 

반응형