Instructions to use JetLM/SDAR-1.7B-Chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JetLM/SDAR-1.7B-Chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JetLM/SDAR-1.7B-Chat", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("JetLM/SDAR-1.7B-Chat", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use JetLM/SDAR-1.7B-Chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JetLM/SDAR-1.7B-Chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JetLM/SDAR-1.7B-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/JetLM/SDAR-1.7B-Chat
- SGLang
How to use JetLM/SDAR-1.7B-Chat 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 "JetLM/SDAR-1.7B-Chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JetLM/SDAR-1.7B-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "JetLM/SDAR-1.7B-Chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JetLM/SDAR-1.7B-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use JetLM/SDAR-1.7B-Chat with Docker Model Runner:
docker model run hf.co/JetLM/SDAR-1.7B-Chat
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -6,7 +6,6 @@ library_name: transformers
|
|
| 6 |
|
| 7 |
**SDAR**(**S**ynergy of **D**iffusion and **A**uto**R**egression)-model is a new large language model that integrates autoregressive (AR) and discrete diffusion modeling strategies. It combines the efficient training paradigm of AR models with the highly parallel inference capability of diffusion models, while delivering performance fully on par with SOTA opensource AR models. At the same time, SDAR sets a new benchmark as the most powerful diffusion language model to date.
|
| 8 |
|
| 9 |
-
---
|
| 10 |
|
| 11 |
# Performance of SDAR-1.7B-Chat on various benchmarks
|
| 12 |
|
|
@@ -31,7 +30,6 @@ evaluation settings:
|
|
| 31 |
|
| 32 |
**Note**: The 4B, 8B, and 30B models are coming soon. Performance results for these models will be released in the near future.
|
| 33 |
|
| 34 |
-
|
| 35 |
## Inference
|
| 36 |
The inference code will come soon
|
| 37 |
|
|
|
|
| 6 |
|
| 7 |
**SDAR**(**S**ynergy of **D**iffusion and **A**uto**R**egression)-model is a new large language model that integrates autoregressive (AR) and discrete diffusion modeling strategies. It combines the efficient training paradigm of AR models with the highly parallel inference capability of diffusion models, while delivering performance fully on par with SOTA opensource AR models. At the same time, SDAR sets a new benchmark as the most powerful diffusion language model to date.
|
| 8 |
|
|
|
|
| 9 |
|
| 10 |
# Performance of SDAR-1.7B-Chat on various benchmarks
|
| 11 |
|
|
|
|
| 30 |
|
| 31 |
**Note**: The 4B, 8B, and 30B models are coming soon. Performance results for these models will be released in the near future.
|
| 32 |
|
|
|
|
| 33 |
## Inference
|
| 34 |
The inference code will come soon
|
| 35 |
|