Instructions to use cccczshao/CALM-Autoencoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cccczshao/CALM-Autoencoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cccczshao/CALM-Autoencoder")# Load model directly from transformers import Autoencoder model = Autoencoder.from_pretrained("cccczshao/CALM-Autoencoder", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cccczshao/CALM-Autoencoder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cccczshao/CALM-Autoencoder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cccczshao/CALM-Autoencoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cccczshao/CALM-Autoencoder
- SGLang
How to use cccczshao/CALM-Autoencoder 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 "cccczshao/CALM-Autoencoder" \ --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": "cccczshao/CALM-Autoencoder", "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 "cccczshao/CALM-Autoencoder" \ --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": "cccczshao/CALM-Autoencoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cccczshao/CALM-Autoencoder with Docker Model Runner:
docker model run hf.co/cccczshao/CALM-Autoencoder
Update model card: Add pipeline tag
#1
by nielsr HF Staff - opened
This PR improves the model card by:
- Adding the
pipeline_tag: text-generationto correctly categorize the model and enable its discoverability on the Hugging Face Hub. This tag is well-supported by the paper's abstract and model description. - The
library_nameremainsCALM. Although theconfig.jsonreferences atransformers_version, the model architecture (Autoencoder) and common usage patterns (often requiringtrust_remote_code=True) suggest that it may not be fully natively integrated with the standardtransformersauto-loading mechanism for the automated "how to use" widget. RetainingCALMavoids a potentially broken default code snippet. - No sample usage section is added, as the provided GitHub README content does not contain an explicit Python code snippet for inference, following the strict guidelines.
Please review and merge if these changes are appropriate.
cccczshao changed pull request status to merged