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")# pip install -U transformers accelerate # Load model directly from transformers import Autoencoder model = Autoencoder.from_pretrained("cccczshao/CALM-Autoencoder", device_map="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
Commit History
-
Update model card: Add pipeline tag
Verified signatureThis PR improves the model card by: - Adding the `pipeline_tag: text-generation` to 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_name` remains `CALM`. Although the `config.json` references a `transformers_version`, the model architecture (`Autoencoder`) and common usage patterns (often requiring `trust_remote_code=True`) suggest that it may not be fully natively integrated with the standard `transformers` auto-loading mechanism for the automated "how to use" widget. Retaining `CALM` avoids 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.7cda26f -
Update README.md
Verified signaturef0cc088
-
Update README.md
Verified signaturecd5f6af
-
Update README.md
Verified signature392d111 -
Update README.md
Verified signature9a20cae -
Update README.md
Verified signature2e51cf0 -
Update README.md
Verified signaturebc9bb07 -
Upload folder using huggingface_hub
Verified signaturef50ef48 -
initial commit
Verified signaturef2674f6