Instructions to use minseo25/CDLM-Dream with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use minseo25/CDLM-Dream with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="minseo25/CDLM-Dream")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("minseo25/CDLM-Dream", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use minseo25/CDLM-Dream with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "minseo25/CDLM-Dream" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "minseo25/CDLM-Dream", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/minseo25/CDLM-Dream
- SGLang
How to use minseo25/CDLM-Dream with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "minseo25/CDLM-Dream" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "minseo25/CDLM-Dream", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "minseo25/CDLM-Dream" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "minseo25/CDLM-Dream", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use minseo25/CDLM-Dream with Docker Model Runner:
docker model run hf.co/minseo25/CDLM-Dream
Improve model card: Add metadata, update paper and GitHub links
#1
by nielsr HF Staff - opened
This PR enhances the model card by:
- Adding
license: mitto the metadata, as explicitly stated in the model card content and confirmed by the GitHub README. - Adding
pipeline_tag: text-generationto the metadata, which helps categorize the model on the Hugging Face Hub for text generation tasks. - Adding
library_name: transformersto the metadata. This is based on theadapter_config.jsonindicatingtransformers_modulesas the parent library, which enables the automated "how to use" widget for loading and using the adapter with atransformersbase model. - Updating the paper link to the official Hugging Face paper page: CDLM: Consistency Diffusion Language Models For Faster Sampling, replacing the "TBA" placeholder.
- Correcting the GitHub repository link to https://github.com/SqueezeAILab/CDLM as identified by the provided GitHub information, ensuring users are directed to the correct project source.
minseo25 changed pull request status to merged