Text Generation
PEFT
Safetensors
Arabic
arabic
relation-extraction
qlora
bitsandbytes
multiple-choice
conversational
Instructions to use U4RASD/DRU-RE-Yehia with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use U4RASD/DRU-RE-Yehia with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Navid-AI/Yehia-7B-preview") model = PeftModel.from_pretrained(base_model, "U4RASD/DRU-RE-Yehia") - Notebooks
- Google Colab
- Kaggle
| set -euo pipefail | |
| ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| cd "${ROOT}" | |
| PYTHON_BIN="${PYTHON_BIN:-python3}" | |
| if ! command -v "${PYTHON_BIN}" >/dev/null 2>&1; then | |
| echo "Could not find ${PYTHON_BIN}." | |
| exit 1 | |
| fi | |
| "${PYTHON_BIN}" - <<'PY' | |
| import sys | |
| print("Python:", sys.version) | |
| if sys.version_info < (3, 10) or sys.version_info >= (3, 13): | |
| raise SystemExit("Use Python 3.10, 3.11, or 3.12.") | |
| PY | |
| if [[ ! -d .venv ]]; then | |
| "${PYTHON_BIN}" -m venv .venv | |
| else | |
| echo "Reusing existing .venv." | |
| fi | |
| source .venv/bin/activate | |
| python -m pip install --upgrade pip setuptools wheel | |
| python -m pip install -r requirements.txt | |
| python - <<'PY' | |
| import huggingface_hub | |
| import torch | |
| import transformers | |
| import vllm | |
| for module in (torch, transformers, vllm, huggingface_hub): | |
| print(module.__name__, getattr(module, "__version__", "unknown")) | |
| print("CUDA available:", torch.cuda.is_available()) | |
| if torch.cuda.is_available(): | |
| print("GPU:", torch.cuda.get_device_name(0)) | |
| print("BF16 supported:", torch.cuda.is_bf16_supported()) | |
| PY | |
| python -m py_compile type_predictor.py run_test.py | |
| bash -n setup_env.sh | |
| bash -n run_test.sh | |
| echo | |
| echo "Environment ready." | |
| echo "Next:" | |
| echo " cp .env.template .env" | |
| echo " edit .env and set HF_TOKENONE" | |
| echo " put test.jsonl at /workspace/test.jsonl" | |
| echo " bash run_test.sh" | |