Text Generation
MLX
English
structured-generation
parallel-decoding
constrained-decoding
apple-silicon
classification
json
Instructions to use botp/Qwen-2.5-1B-RLCD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use botp/Qwen-2.5-1B-RLCD with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("botp/Qwen-2.5-1B-RLCD") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use botp/Qwen-2.5-1B-RLCD with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "botp/Qwen-2.5-1B-RLCD" --prompt "Once upon a time"
- Atomic Chat
Download Dockerfile from botp/Qwen-2.5-1B-RLCD: direct link, hf CLI and curl.
- Browser
- Download file 888 Bytes
-
https://huggingface.co/botp/Qwen-2.5-1B-RLCD/resolve/main/Dockerfile
- Command line
-
hf download hf://botp/Qwen-2.5-1B-RLCD/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/botp/Qwen-2.5-1B-RLCD/resolve/main/Dockerfile
888 Bytes
| FROM python:3.11-slim | |
| # Create standard non-root user with UID 1000 for Hugging Face Spaces | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /home/user/app | |
| # Install minimal OS dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| git \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Switch to non-root user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| PYTHONUNBUFFERED=1 \ | |
| PORT=7860 \ | |
| BACKEND=torch \ | |
| MODEL_ID=Qwen/Qwen2.5-1.5B-Instruct | |
| # Install Python requirements | |
| COPY --chown=user requirements-spaces.txt /home/user/app/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # Copy source tree | |
| COPY --chown=user . /home/user/app | |
| EXPOSE 7860 | |
| CMD ["python3", "-m", "uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"] | |