smolagents/tests
devedge2026 51ec5ae6e1 fix(transformers): forward quantization_config to from_pretrained
TransformersModel accepted quantization_config only through **kwargs;
the value was stored on self.kwargs and never forwarded to
AutoModelForImageTextToText/AutoModelForCausalLM.from_pretrained, so
quantization (e.g. 8-bit loading with BitsAndBytesConfig) silently did
not activate and the model loaded unquantized.

Give TransformersModel an explicit quantization_config parameter, merge
it into the kwargs forwarded to both from_pretrained calls, preserve the
existing model_kwargs escape hatch, and warn when quantization_config is
supplied through both channels (explicit argument wins).

Add two regression tests covering forwarding and the default omission.
2026-11-21 11:00:23 +00:00
..
data Remove dependency on transformers get_tests_dir (#1026) 2025-03-19 19:58:38 +01:00
fixtures Remove deprecated last_input_token_count and last_output_token_count (#1652) 2025-08-07 11:36:56 +02:00
utils Support transformers 4.54.0 (#1625) 2025-07-27 11:54:51 +02:00
__init__.py Initialize repo structure. 2024-12-06 17:46:42 +01:00
conftest.py Fix Tool.to_dict for nullable input parameter (#1038) 2025-03-25 13:49:45 +01:00
test_agents.py Fix log_error rendering brackets as Rich markup (#2077) 2026-03-13 17:06:07 +01:00
test_all_docs.py Rename docs files from .mdx to .md (#1471) 2025-06-23 15:40:13 +02:00
test_cli.py Dialog mode cli (#1540) 2025-11-12 13:37:32 +01:00
test_default_tools.py Add Exa as a search engine option in WebSearchTool (#2139) 2026-05-26 23:50:28 +02:00
test_final_answer.py Remove transformers/huggingface-hub to check torch availability (#1022) 2025-03-28 08:30:31 +01:00
test_function_type_hints_utils.py Support tools with union type return (#1294) 2025-05-05 12:03:49 +02:00
test_gradio_ui.py Remove deprecated last_input_token_count and last_output_token_count (#1652) 2025-08-07 11:36:56 +02:00
test_import.py Fix CI usage of uv (#970) 2025-03-13 11:35:01 -07:00
test_local_python_executor.py Fix evaluate_with by suppressing exception if truthy __exit__ (#2033) 2026-03-01 19:36:14 +01:00
test_mcp_client.py Support MCP structured output and output schema (#1663) 2025-08-22 11:49:16 +02:00
test_memory.py Make RunResult json serializable (#1659) 2025-08-09 12:41:40 +02:00
test_models.py fix(transformers): forward quantization_config to from_pretrained 2026-11-21 11:00:23 +00:00
test_monitoring.py Fix Rich MarkupError in AgentLogger.log_task by rendering untrusted text safely (#1894) 2026-03-01 20:49:53 +01:00
test_remote_executors.py Remove remote WasmExecutor (#2321) 2026-05-29 07:03:46 +02:00
test_search.py Fix CI DuckDuckGoSearchTool tests raising 202 Ratelimit (#1324) 2025-05-15 14:29:24 +02:00
test_serialization.py Fix SafeSerializer.get_deserializer_code (#1983) 2026-02-15 13:36:21 +01:00
test_telemetry.py Test telemetry extra (#1700) 2025-08-20 16:52:48 +02:00
test_tool_validation.py Fix WebSearchTool validation error (#1367) 2025-05-22 16:40:57 +02:00
test_tools.py Fix typo cleanups across docs, examples, and tests (#2208) 2026-05-14 14:42:18 +02:00
test_types.py Support transformers 4.54.0 (#1625) 2025-07-27 11:54:51 +02:00
test_utils.py Factorize create_agent_gradio_app_template function (#1616) 2025-07-25 19:59:46 +02:00
test_vision_web_browser.py Fix XPath injection in search_item_ctrl_f (#1768) 2025-09-25 10:38:21 +02:00