Text Classification
MLX
Safetensors
Laya
Polish
English
devops
decision-model
apple-silicon
experimental
synthetic-data
claude-code
litellm
Instructions to use tebebe/laya-devops-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use tebebe/laya-devops-mlx with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download tebebe/laya-devops-mlx --local-dir laya-devops-mlx
- Laya
How to use tebebe/laya-devops-mlx with Laya:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Download runtime/operating_policy.py from tebebe/laya-devops-mlx: direct link, hf CLI and curl.
- Browser
- Download file 1.13 kB
-
https://huggingface.co/tebebe/laya-devops-mlx/resolve/main/runtime/operating_policy.py
- Command line
-
hf download hf://tebebe/laya-devops-mlx/runtime/operating_policy.py
-
curl -L -o operating_policy.py https://huggingface.co/tebebe/laya-devops-mlx/resolve/main/runtime/operating_policy.py
1.13 kB
| """Persist a validation-selected threshold without granting execution permission.""" | |
| import json | |
| def load_allow_threshold(model, override=None): | |
| if override is not None:return override | |
| path=model/'operating-policy.json' | |
| if not path.exists():return .90 | |
| policy=json.loads(path.read_text());threshold=float(policy['allow_threshold']) | |
| if not 0<=threshold<=1.0001:raise ValueError('Invalid saved operating threshold') | |
| if (threshold>1)!=bool(policy.get('disable_automatic_allow',False)): | |
| raise ValueError('Inconsistent automatic ALLOW disabling policy') | |
| return threshold | |
| def save_experimental_policy(model,validation): | |
| policy=dict(allow_threshold=validation['operating_threshold'],disable_automatic_allow=validation['operating_threshold']>1, | |
| selected_on='validation_only',validation_sha256=validation['dataset_sha256'],validation_passed=validation['readiness']['passed'], | |
| criteria_passed=False,status='experimental_until_test_and_audit_pass',production_execution_enabled=False) | |
| (model/'operating-policy.json').write_text(json.dumps(policy,indent=2)+'\n') | |