Text Generation
Transformers
PyTorch
English
crystalcoder
llm
code
custom_code
Eval Results (legacy)
Instructions to use IFM/CrystalChat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IFM/CrystalChat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IFM/CrystalChat", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("IFM/CrystalChat", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use IFM/CrystalChat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IFM/CrystalChat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IFM/CrystalChat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/IFM/CrystalChat
- SGLang
How to use IFM/CrystalChat 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/CrystalChat" \ --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/CrystalChat", "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/CrystalChat" \ --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/CrystalChat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use IFM/CrystalChat with Docker Model Runner:
docker model run hf.co/IFM/CrystalChat
Update README.md
Browse filestest out metrics metadata
README.md
CHANGED
|
@@ -27,6 +27,43 @@ datasets:
|
|
| 27 |
- nickrosh/Evol-Instruct-Code-80k-v1
|
| 28 |
- open-phi/textbooks
|
| 29 |
- open-phi/programming_books_llama
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
---
|
| 31 |
|
| 32 |
# CrystalChat
|
|
|
|
| 27 |
- nickrosh/Evol-Instruct-Code-80k-v1
|
| 28 |
- open-phi/textbooks
|
| 29 |
- open-phi/programming_books_llama
|
| 30 |
+
|
| 31 |
+
model-index:
|
| 32 |
+
- name: CrystalChat
|
| 33 |
+
results:
|
| 34 |
+
- task:
|
| 35 |
+
type: multiple-choice # Required. Example: automatic-speech-recognition
|
| 36 |
+
dataset:
|
| 37 |
+
type: race # Required. Example: common_voice. Use dataset id from https://hf.co/datasets
|
| 38 |
+
name: RACE # Required. A pretty name for the dataset. Example: Common Voice (French)
|
| 39 |
+
metrics:
|
| 40 |
+
- name: accuracy
|
| 41 |
+
type: accuracy # Required. Example: wer. Use metric id from https://hf.co/metrics
|
| 42 |
+
value: 41.148 # Required. Example: 41.148
|
| 43 |
+
- task:
|
| 44 |
+
type: text-generation # Required. Example: automatic-speech-recognition
|
| 45 |
+
dataset:
|
| 46 |
+
type: openai_humanneval # Required. Example: common_voice. Use dataset id from https://hf.co/datasets
|
| 47 |
+
name: OpenAI HumanEval # Required. A pretty name for the dataset. Example: Common Voice (French)
|
| 48 |
+
metrics:
|
| 49 |
+
- name: pass@1
|
| 50 |
+
type: pass@1 # Required. Example: wer. Use metric id from https://hf.co/metrics
|
| 51 |
+
value: 31.707 # Required. Example: 41.148
|
| 52 |
+
- name: pass@10
|
| 53 |
+
type: pass@10
|
| 54 |
+
value: 65.755
|
| 55 |
+
- task:
|
| 56 |
+
type: text-generation # Required. Example: automatic-speech-recognition
|
| 57 |
+
dataset:
|
| 58 |
+
type: mbpp # Required. Example: common_voice. Use dataset id from https://hf.co/datasets
|
| 59 |
+
name: Mostly Basic Python Problems (mbpp) # Required. A pretty name for the dataset. Example: Common Voice (French)
|
| 60 |
+
metrics:
|
| 61 |
+
- name: pass@1
|
| 62 |
+
type: pass@1 # Required. Example: wer. Use metric id from https://hf.co/metrics
|
| 63 |
+
value: 39.4 # Required. Example: 41.148
|
| 64 |
+
- name: pass@10
|
| 65 |
+
type: pass@10
|
| 66 |
+
value: 59.895
|
| 67 |
---
|
| 68 |
|
| 69 |
# CrystalChat
|