Text Generation
Transformers
PyTorch
English
t5
text2text-generation
Eval Results (legacy)
text-generation-inference
Instructions to use liujch1998/crystal-11b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use liujch1998/crystal-11b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="liujch1998/crystal-11b")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("liujch1998/crystal-11b") model = AutoModelForSeq2SeqLM.from_pretrained("liujch1998/crystal-11b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use liujch1998/crystal-11b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "liujch1998/crystal-11b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "liujch1998/crystal-11b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/liujch1998/crystal-11b
- SGLang
How to use liujch1998/crystal-11b 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 "liujch1998/crystal-11b" \ --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": "liujch1998/crystal-11b", "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 "liujch1998/crystal-11b" \ --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": "liujch1998/crystal-11b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use liujch1998/crystal-11b with Docker Model Runner:
docker model run hf.co/liujch1998/crystal-11b
Commit ·
8c3ffcb
1
Parent(s): 0f3b775
Update README.md
Browse files
README.md
CHANGED
|
@@ -3,6 +3,7 @@ license: mit
|
|
| 3 |
language:
|
| 4 |
- en
|
| 5 |
pipeline_tag: text2text-generation
|
|
|
|
| 6 |
|
| 7 |
model-index:
|
| 8 |
- name: crystal-11b
|
|
@@ -96,7 +97,7 @@ model-index:
|
|
| 96 |
|
| 97 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 98 |
|
| 99 |
-
Crystal is an introspective reasoning model commonsense QA. See our paper at: <>.
|
| 100 |
|
| 101 |
## Model Details
|
| 102 |
|
|
@@ -119,7 +120,7 @@ We call this process "introspective reasoning", and it improves both the predict
|
|
| 119 |
<!-- Provide the basic links for the model. -->
|
| 120 |
|
| 121 |
- **Repository:** <https://github.com/liujch1998/crystal>
|
| 122 |
-
- **Paper [optional]:** <>
|
| 123 |
- **Demo [optional]:** <https://huggingface.co/spaces/liujch1998/crystal>
|
| 124 |
|
| 125 |
## Uses
|
|
@@ -212,6 +213,13 @@ You may also refer to <https://huggingface.co/spaces/liujch1998/crystal/blob/mai
|
|
| 212 |
**BibTeX:**
|
| 213 |
|
| 214 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 215 |
```
|
| 216 |
|
| 217 |
## Model Card Contact
|
|
|
|
| 3 |
language:
|
| 4 |
- en
|
| 5 |
pipeline_tag: text2text-generation
|
| 6 |
+
arxiv: 2310.04921
|
| 7 |
|
| 8 |
model-index:
|
| 9 |
- name: crystal-11b
|
|
|
|
| 97 |
|
| 98 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 99 |
|
| 100 |
+
Crystal is an introspective reasoning model commonsense QA. See our paper at: <https://arxiv.org/abs/2310.04921>.
|
| 101 |
|
| 102 |
## Model Details
|
| 103 |
|
|
|
|
| 120 |
<!-- Provide the basic links for the model. -->
|
| 121 |
|
| 122 |
- **Repository:** <https://github.com/liujch1998/crystal>
|
| 123 |
+
- **Paper [optional]:** <https://arxiv.org/abs/2310.04921>
|
| 124 |
- **Demo [optional]:** <https://huggingface.co/spaces/liujch1998/crystal>
|
| 125 |
|
| 126 |
## Uses
|
|
|
|
| 213 |
**BibTeX:**
|
| 214 |
|
| 215 |
```
|
| 216 |
+
@article{Liu2023CrystalIR,
|
| 217 |
+
title={Crystal: Introspective Reasoners Reinforced with Self-Feedback},
|
| 218 |
+
author={Jiacheng Liu and Ramakanth Pasunuru and Hannaneh Hajishirzi and Yejin Choi and Asli Celikyilmaz},
|
| 219 |
+
journal={ArXiv},
|
| 220 |
+
year={2023},
|
| 221 |
+
volume={abs/2310.04921}
|
| 222 |
+
}
|
| 223 |
```
|
| 224 |
|
| 225 |
## Model Card Contact
|