Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Ensure user sets backend to local w/ quantization (#3524)" #3531

Merged
merged 1 commit into from
Aug 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions ludwig/config_validation/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,6 @@ def _get_llm_model_config(model_name: str) -> AutoConfig:
def check_llm_quantization_backend_incompatibility(config: "ModelConfig") -> None: # noqa: F821
"""Checks that LLM model type with quantization uses the local backend."""
if config.backend is None:
if config.model_type == MODEL_LLM and config.quantization:
raise ConfigValidationError("LLM with quantization requires the 'local' backend to be set in the config.")
return

backend_type = config.backend.get("type", "local")
Expand Down
5 changes: 1 addition & 4 deletions tests/ludwig/config_validation/test_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,7 @@ def test_check_llm_quantization_backend_incompatibility():
ModelConfig.from_dict(config)

del config["backend"]
with pytest.raises(ConfigValidationError):
ModelConfig.from_dict(config)
ModelConfig.from_dict(config)

del config["quantization"]
config["backend"] = {"type": "ray"}
Expand All @@ -444,8 +443,6 @@ def test_check_qlora():
type: text
trainer:
type: finetune
backend:
type: local
"""
)

Expand Down
1 change: 0 additions & 1 deletion tests/ludwig/schema/test_model_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,6 @@ def test_llm_quantization_config(bits: Optional[int], expected_qconfig: Optional
"quantization": {"bits": bits},
INPUT_FEATURES: [{NAME: "text_input", TYPE: "text"}],
OUTPUT_FEATURES: [{NAME: "text_output", TYPE: "text"}],
"backend": {"type": "local"},
}

if bits is None:
Expand Down
Loading