Instructions to use cccczshao/CALM-M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cccczshao/CALM-M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cccczshao/CALM-M")# pip install -U transformers accelerate # Load model directly from transformers import EnergyTransformer model = EnergyTransformer.from_pretrained("cccczshao/CALM-M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cccczshao/CALM-M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cccczshao/CALM-M" # 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-M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cccczshao/CALM-M
- SGLang
How to use cccczshao/CALM-M 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-M" \ --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-M", "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-M" \ --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-M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cccczshao/CALM-M with Docker Model Runner:
docker model run hf.co/cccczshao/CALM-M
Commit History
-
Upload pytorch_model.bin
Verified signature391dbc2 -
Delete pytorch_model.bin
Verified signaturec0a2be6 -
Upload pytorch_model.bin
Verified signature93ec58c -
Delete pytorch_model.bin
Verified signaturee808255 -
Upload pytorch_model.bin
Verified signature6b47a8b -
Update README.md
Verified signatureeb12163
-
Update model card: Add `text-generation` pipeline tag, `transformers` library, and sample usage (#1)
Verified signature- Update model card: Add `text-generation` pipeline tag, `transformers` library, and sample usage (a70b75dcc1df9280ce25043c7d46551d3aedd58f) Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>038f3cf
-
Update README.md
Verified signature1657b2d
-
Update README.md
Verified signature11db8ab
-
Update README.md
Verified signature4965b36 -
Update README.md
Verified signature886716a -
Update README.md
Verified signature52c108a -
Update README.md
Verified signatured0f8eab -
Upload folder using huggingface_hub
Verified signature0aa2f3e -
initial commit
Verified signaturef57298b