Downloads · 30 days
7
20% of all-time downloads
slicedonions/self-driving-rl-v1
self-driving-rl-v1 is a reinforcement learning model from slicedonions. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product. It is set up for stable-baselines3. The card lists the license as mit.
Watch the frozen driver make live decisions in the interactive Hugging Face Space. Each viewer gets an independent hard-mode, dynamic-traffic session running locally in their browser; it is not a prerecorded replay.
Downloads · 30 days
7
20% of all-time downloads
All-time downloads
35
Public
Repo size
4.6 MB
Likes
1
Public
Click a slice to open those files.
.zip3.6 MB · 79%
From the Hugging Face model README
Watch the frozen driver make live decisions in the interactive Hugging Face Space. Each viewer gets an independent hard-mode, dynamic-traffic session running locally in their browser; it is not a prerecorded replay.
This model package contains the two learned layers of the recommended Self-Driving RL driver:
model.zip: the validation-selected checkpoint from a 2.5M-step V5 QR-DQN
run;override_model.pt: the calibrated V6 confidence-gated preference residual.v5-qrdqn.onnx and v6-rlaif-override.onnx: parity-checked browser exports
used by the public live Space.The complete driver also requires the v1.0 repository code. Its V7/V8
LongitudinalIntentPolicy adds deterministic persistent speed intent, smooth
braking, and safety logic. No DAgger weights are included: the evaluated DAgger
candidates were rejected by the matched-seed promotion gate and are not part of
the recommended driver.
License: the code, documentation,
model.zip, andoverride_model.ptare released under the MIT License; seeLICENSE. This is the official model package forslicedonions/self-driving-rl-v1.
| Layer | Role | Format |
|---|---|---|
| V5 | Frozen QR-DQN base policy | Stable-Baselines3 / sb3-contrib ZIP |
| V6 | Sparse RLAIF calm/pass corrections | PyTorch weights-only checkpoint |
| Browser | V5/V6 learned layers | ONNX opset 18 |
| V7/V8 | Persistent intent, braking, and safety controller | Repository Python code |
[256, 256] with 64 quantiles.model.zip; the final
live checkpoint was more assertive and less safe, so it was not packaged.The full V5 configuration is in config/v5-training-config.json and V6
provenance is in config/v6-override-provenance.json.
Install the public package with:
git clone https://github.com/becauseno7/Self-Driving-RL.git
cd Self-Driving-RL
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e . huggingface_hub
hf download slicedonions/self-driving-rl-v1 model.zip override_model.pt --local-dir models
Verify both downloads before use:
model.zip
bytes: 3594202
sha256: 5780BBEE5CE2009459F3AA796AA4982FBF33222DCC182883D31AFAA16C597039
override_model.pt
bytes: 35439
sha256: 06C3A0CEE04AAF6B8822781FE78F867F513A3019EBBF7FD8D91E10F117146BEC
The supported high-level loading example is the project CLI:
sdr-rlaif watch \
--base-model models/model.zip \
--override-model models/override_model.pt \
--longitudinal-intent --dynamic-traffic \
--difficulty hard --device cpu --episodes 10
The equivalent Python composition is:
from pathlib import Path
from self_driving_rl.longitudinal import LongitudinalIntentPolicy
from self_driving_rl.rlaif import load_override_policy
preference_policy = load_override_policy(
Path("models/model.zip"),
Path("models/override_model.pt"),
device="cpu",
)
driver = LongitudinalIntentPolicy(preference_policy)
# action = int(driver(observation)) # observation.shape == (33,)
Stable-Baselines3 model ZIPs can deserialize cloudpickle. That is a trusted
code-loading boundary: use only approved artifacts, verify the SHA-256 digest,
and prefer a minimally privileged environment. The override loader uses
torch.load(..., weights_only=True).
The final release evaluation ran the complete stack on 100 contiguous,
previously unused seeds (690000–690099) in hard mode with dynamic traffic.
Every route was 45 simulated seconds.
| Metric | Result |
|---|---|
| Completion | 100% |
| Crash rate | 0% |
| Mean net passes / route | 8.43 |
| Passing response | 90.2% |
| Clear-road deep slowdown | 0.04% of steps |
The raw result is in
evaluation/v8-braking-final-unseen-100.json. Reproduce it with:
sdr-rlaif override-evaluate \
--base-model model.zip \
--override-model override_model.pt \
--longitudinal-intent --dynamic-traffic \
--difficulty hard --device cpu \
--episodes 100 --seed 690000
V5 was trained in the custom NeonHighwayEnv-v5 task with QR-DQN from
sb3-contrib==2.9.0, PyTorch 2.13.0+cu126, Gymnasium 1.3.0, a replay size of
750,000, batch size 512, gamma 0.995, learning rate 0.00015, Polyak factor 0.02,
four gradient steps per environment step, and exploration from 1.0 to 0.02 over
30% of training. Periodic 100-route validation selected the packaged model.
V6 kept that checkpoint frozen. Its preference source comprised 96 matched trajectories, 160 comparisons, and 128 individually reviewed AI labels using an ordered safety/completion/passing/calmness rubric. A residual learned leave, calm-correction, or pass-correction choices from 54,000 completed-trajectory states. Confidence calibration and an independent front/rear gap and TTC shield limit deployment-time interventions.
HOLD; none
is silently bundled here.v1.0.0 source tag.See artifact-manifest.json for the machine-readable file inventory and the
project README for the architecture and learning guides.