Text Generation
PEFT
Safetensors
English
activation-steering
representation-engineering
affective-computing
research
lora
conversational
Instructions to use CODELOCKHF/CODELOCK-8Bbeta with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use CODELOCKHF/CODELOCK-8Bbeta with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-8B") model = PeftModel.from_pretrained(base_model, "CODELOCKHF/CODELOCK-8Bbeta") - Notebooks
- Google Colab
- Kaggle
Download scripts/setup_cloud.sh from CODELOCKHF/CODELOCK-8Bbeta: direct link, hf CLI and curl.
- Browser
- Download file 805 Bytes
-
https://huggingface.co/CODELOCKHF/CODELOCK-8Bbeta/resolve/main/scripts/setup_cloud.sh
- Command line
-
hf download hf://CODELOCKHF/CODELOCK-8Bbeta/scripts/setup_cloud.sh
-
curl -L -o setup_cloud.sh https://huggingface.co/CODELOCKHF/CODELOCK-8Bbeta/resolve/main/scripts/setup_cloud.sh
805 Bytes
| # Linux/RunPod: isolated Python environment reusing the image's CUDA torch. | |
| set -euo pipefail | |
| cd "$(dirname "$0")/.." | |
| python3 -m venv --system-site-packages .venv-v2 | |
| PYTHON=.venv-v2/bin/python | |
| "$PYTHON" -m pip install -e '.[dev]' | |
| nvidia-smi --query-gpu=name,memory.total --format=csv | |
| "$PYTHON" - <<'PY' | |
| from pathlib import Path | |
| from huggingface_hub import snapshot_download | |
| target = Path('models/Qwen3-8B') | |
| index = target / 'model.safetensors.index.json' | |
| if not index.is_file(): | |
| snapshot_download('Qwen/Qwen3-8B', local_dir=target, | |
| allow_patterns=['*.json', '*.safetensors', '*.txt', '*.model', 'tokenizer*']) | |
| print('Base model:', target.resolve()) | |
| PY | |
| "$PYTHON" -m pytest | |
| echo 'Ready. Run: .venv-v2/bin/python scripts/run_pipeline.py --model models/Qwen3-8B' | |