# Unable to load a pretrained starcoder2 with SFT

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funable-to-load-a-pretrained-starcoder2-with-sft%2F79768%3E%5C
**Category:** 🤗Transformers\
**Created:** [April 2, 2024, 6:26am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funable-to-load-a-pretrained-starcoder2-with-sft%2F79768 "2024-04-02T06:26:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![HimanshiSinha](https://avatars.discourse-cdn.com/v4/letter/h/dbc845/32.png) [@HimanshiSinha](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FHimanshiSinha)%5C
**Post date:** [April 2, 2024, 6:26am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funable-to-load-a-pretrained-starcoder2-with-sft%2F79768%2F1 "2024-04-02T06:26:03Z")

</div>

AutoModelForCausalLM.from\_pretrained(pretrained\_model\_name\_or\_path)

Getting the following error  
functionexecutor-run-evaluation-d4381aa-3454115740: Traceback (most recent call last):  
functionexecutor-run-evaluation-d4381aa-3454115740: File “/app/code/evaluation/evaluation\_codesign.py”, line 989, in   
functionexecutor-run-evaluation-d4381aa-3454115740: llm\_chain = get\_llm\_chain(model\_type,  
functionexecutor-run-evaluation-d4381aa-3454115740: File “/app/code/evaluation/evaluation\_utils.py”, line 317, in get\_llm\_chain  
functionexecutor-run-evaluation-d4381aa-3454115740: model = from\_pretrained\_wrapper(model\_name\_or\_path,  
functionexecutor-run-evaluation-d4381aa-3454115740: File “/app/code/evaluation/evaluation\_utils.py”, line 189, in from\_pretrained\_wrapper  
functionexecutor-run-evaluation-d4381aa-3454115740: AutoModelForCausalLM.from\_pretrained(pretrained\_model\_name\_or\_path)  
functionexecutor-run-evaluation-d4381aa-3454115740: File “/usr/local/lib/python3.8/dist-packages/transformers/models/auto/auto\_factory.py”, line 563, in from\_pretrained  
functionexecutor-run-evaluation-d4381aa-3454115740: return model\_class.from\_pretrained(  
functionexecutor-run-evaluation-d4381aa-3454115740: File “/usr/local/lib/python3.8/dist-packages/transformers/modeling\_utils.py”, line 3039, in from\_pretrained  
functionexecutor-run-evaluation-d4381aa-3454115740: config.quantization\_config = AutoHfQuantizer.merge\_quantization\_configs(  
functionexecutor-run-evaluation-d4381aa-3454115740: File “/usr/local/lib/python3.8/dist-packages/transformers/quantizers/auto.py”, line 149, in merge\_quantization\_configs  
functionexecutor-run-evaluation-d4381aa-3454115740: quantization\_config = AutoQuantizationConfig.from\_dict(quantization\_config)  
functionexecutor-run-evaluation-d4381aa-3454115740: File “/usr/local/lib/python3.8/dist-packages/transformers/quantizers/auto.py”, line 73, in from\_dict  
functionexecutor-run-evaluation-d4381aa-3454115740: raise ValueError(  
functionexecutor-run-evaluation-d4381aa-3454115740: ValueError: Unknown quantization type, got bitsandbytes - supported types are: [‘awq’, ‘bitsandbytes\_4bit’, ‘bitsandbytes\_8bit’, ‘gptq’, ‘aqlm’, ‘quanto’]
