Instructions to use IFM/Crystal with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IFM/Crystal with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IFM/Crystal", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("IFM/Crystal", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use IFM/Crystal with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IFM/Crystal" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IFM/Crystal", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/IFM/Crystal
- SGLang
How to use IFM/Crystal 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 "IFM/Crystal" \ --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": "IFM/Crystal", "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 "IFM/Crystal" \ --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": "IFM/Crystal", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use IFM/Crystal with Docker Model Runner:
docker model run hf.co/IFM/Crystal
Commit History
-
Adding `safetensors` variant of this model
Verified signatureThis is an automated PR created with https://huggingface.co/spaces/safetensors/convert This new file is equivalent to `pytorch_model.bin` but safe in the sense that no arbitrary code can be put into it. These files also happen to load much faster than their pytorch counterpart: https://colab.research.google.com/github/huggingface/notebooks/blob/main/safetensors_doc/en/speed.ipynb The widgets on your model page will run using this model even if this is not merged making sure the file actually works. If you find any issues: please report here: https://huggingface.co/spaces/safetensors/convert/discussions Feel free to ignore this PR.1a635c5
-
Update README.md
Verified signature34fc9cd -
Update README.md
Verified signaturee457755 -
Update README.md
Verified signature0ccb0e1
-
Update config.json
Verified signature3d719c2 -
Delete model.safetensors.index.json with huggingface_hub
Verified signature1365932 -
Delete model-00003-of-00003.safetensors with huggingface_hub
Verified signature5bdd294 -
Delete model-00002-of-00003.safetensors with huggingface_hub
Verified signatured76a91e -
Delete model-00001-of-00003.safetensors with huggingface_hub
Verified signature6c7f4eb -
Upload folder using huggingface_hub
Verified signature2550c50
-
Delete performance_in_benchmarks_barchart.png
Verified signaturea8c07fe -
Upload performance_in_benchmarks.png
Verified signature840b998 -
Delete performance_in_benchmarks.png
Verified signature56021b5
-
add performance radar chart
Verified signature32daf8f -
Upload performance_radarchart.png
Verified signaturedbd5773 -
Delete performance_radarchart.png
Verified signature8eae9d3 -
Upload performance_radarchart.png
Verified signaturecc1a3a6
-
replaced hyperparameter table with a premade png
Verified signature4cbb4bf -
Upload hyperparameters.png
Verified signaturef2edc45 -
Upload logo-web250.png
Verified signature834461d -
Update README.md
Verified signatureadd some bullets emoji to model carddbafa41 -
Update README.md
Verified signatureadd a bar chart to illustrate crystalcoder's performance in benchmarks6f13575 -
Upload performance_in_benchmarks_barchart.png
Verified signaturebed34b9 -
Upload crystalcoder_emoji.png
Verified signatureadd crystakcoder emoji924365e -
Upload performance_in_benchmarks.png
Verified signatured8da85e -
Delete performance_in_benchmarks.png
Verified signaturee0f6aae -
change table of performance in benchmarks
Verified signaturereplace the table with a premade table picturef95d63f -
Upload performance_in_benchmarks.png
Verified signatureperformance_in_benchmarks table0110944 -
Delete performance_in_benchmarks.png
Verified signature9cdc5f9 -
Upload performance_in_benchmarks.png
Verified signaturetable of performance_in_benchmarks0d02dc4
-
Update README.md
Verified signature751e527
-
Update README.md
Verified signaturerecompute the average.aec46d9 -
Update README.md
Verified signatureclarify result table and add details to the table.790f0aa
-
Delete pytorch_model.bin.index.json
Verified signature2b09f9e -
Delete pytorch_model-00004-of-00004.bin
Verified signature419437e -
Delete pytorch_model-00003-of-00004.bin
Verified signature706ce83 -
Delete pytorch_model-00002-of-00004.bin
Verified signature0ca9383 -
Delete pytorch_model-00001-of-00004.bin
Verified signature38f1ce4 -
Upload folder using huggingface_hub
Verified signature9e73530
-
Update README.md
fa1322b
-
Update README.md
57b9d49
-
Upload crystalcoder_logo.jpg
add logo4d41e2b -
Update README.md
4a0ff60 -
Update README.md
b869cdf -
Update README.md
Populating more results in the table.bcdfc3c -
Update README.md
fccd79b
-
Update README.md
03e8a27
-
Update README.md
160aa16
-
Update README.md
ba27280 -
Update README.md
8e5fa54