lucasjinreal / lucasjinreal/Namo-R1
KeyError: 'siglip2_vision_model' when loading Namo-500M-V2 model
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 256
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
**Description:**
I am encountering an issue while attempting to start a server using the `namo` command-line tool with the `Namo-500M-V2` model. The error seems to stem from an issue in loading the configuration for the vision model component.
---
**Steps to Reproduce:**
1. Install the necessary dependencies and set up the environment.
2. Run the command: `namo server --model checkpoints/Namo-500M-V2`
3. Observe the following error message:
```
Starting the server...
Traceback (most recent call last):
File "D:\LocalAIProject\runtime\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "D:\LocalAIProject\runtime\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "D:\LocalAIProject\runtime\Scripts\namo.exe\__main__.py", line 7, in
sys.exit(main())
File "D:\LocalAIProject\runtime\lib\site-packages\namo\cli.py", line 46, in main
args.func(args)
File "D:\LocalAIProject\runtime\lib\site-packages\namo\cli.py", line 12, in handle_server
start_server(ip=args.ip, port=args.port, model=args.model)
File "D:\LocalAIProject\runtime\lib\site-packages\namo\api\openai.py", line 312, in start_server
global_model = NamoVL(model_path=model_path, device="auto")
File "D:\LocalAIProject\runtime\lib\site-packages\namo\api\namo.py", line 30, in __init__
super().__init__(model_path, processor_path, device)
File "D:\LocalAIProject\runtime\lib\site-packages\namo\api\base.py", line 18, in __init__
self.model = self.load_model(model_path)
File "D:\LocalAIProject\runtime\lib\site-packages\namo\api\namo.py", line 45, in load_model
model = NamoForCausalLM.from_pretrained(
File "D:\LocalAIProject\runtime\lib\site-packages\transformers\modeling_utils.py", line 262, in _wrapper
return func(*args, **kwargs)
File "D:\LocalAIProject\runtime\lib\site-packages\transformers\modeling_utils.py", line 3647, in from_pretrained
config, model_kwargs = cls.config_class.from_pretrained(
File "D:\LocalAIProject\runtime\lib\site-packages\transformers\configuration_utils.py", line 572, in from_pretrained
return cls.from_dict(config_dict, **kwargs)
File "D:\LocalAIProject\runtime\lib\site-packages\transformers\configuration_utils.py", line 743, in from_dict
config = cls(**config_dict)
File "D:\LocalAIProject\runtime\lib\site-packages\namo\models\configuration_namo.py", line 59, in __init__
vision_config = CONFIG_MAPPING[vision_config["model_type"]](**vision_config)
File "D:\LocalAIProject\runtime\lib\site-packages\transformers\models\auto\configuration_auto.py", line 794, in __getitem__
raise KeyError(key)
KeyError: 'siglip2_vision_model'
```
**Expected Behavior:**
The server should start successfully without any errors, and the model should be loaded correctly.
**Additional Information:**
I have verified that the model files are present in the specified directory. The error specifically points to an issue with the vision model configuration, where `siglip2_vision_model` is not found in the `CONFIG_MAPPING`.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the model-loading path in namo/api/namo.py and the vision configuration handling in namo/models/configuration_namo.py, then inspect the installed Transformers CONFIG_MAPPING entry for siglip2_vision_model. Reproduce with `namo server --model checkpoints/Namo-500M-V2`; done means the configuration loads and the server starts successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100