Text Generation
Transformers
Safetensors
llama
Merge
reasoning
R1
Deca
Deca-AI
uncensored
conversational
text-generation-inference
Instructions to use deca-ai/2-pro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deca-ai/2-pro with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="deca-ai/2-pro") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("deca-ai/2-pro") model = AutoModelForCausalLM.from_pretrained("deca-ai/2-pro") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use deca-ai/2-pro with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "deca-ai/2-pro" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deca-ai/2-pro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/deca-ai/2-pro
- SGLang
How to use deca-ai/2-pro 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 "deca-ai/2-pro" \ --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": "deca-ai/2-pro", "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 "deca-ai/2-pro" \ --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": "deca-ai/2-pro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use deca-ai/2-pro with Docker Model Runner:
docker model run hf.co/deca-ai/2-pro
system commited on
Create LICENSE.md
Browse files- LICENSE.md +29 -0
LICENSE.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
### The Deca 2 license has been deemed expired, the model is currently licensed under Apache 2.0
|
| 5 |
+
## TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. **Definitions.**
|
| 8 |
+
- "License" means the terms and conditions for use, reproduction, and distribution as defined in this document.
|
| 9 |
+
- "Licensor" means the copyright owner or entity authorized by the copyright owner that is granting the License.
|
| 10 |
+
- "You" (or "Your") means the individual or entity exercising permissions under this License.
|
| 11 |
+
|
| 12 |
+
2. **Grant of Copyright License.**
|
| 13 |
+
The Licensor hereby grants you a worldwide, royalty-free, non-exclusive license to use, reproduce, and distribute the model in source or binary form, with or without modification, under the terms of this License.
|
| 14 |
+
|
| 15 |
+
3. **Grant of Patent License.**
|
| 16 |
+
The Licensor grants you a non-exclusive, royalty-free, irrevocable (subject to termination as stated below) patent license to make, use, sell, and distribute the model.
|
| 17 |
+
|
| 18 |
+
4. **Redistribution.**
|
| 19 |
+
You may reproduce and distribute copies of the model or derivative works thereof, under the terms of this License, provided that you:
|
| 20 |
+
- Include a copy of this License with every copy or substantial portion of the model.
|
| 21 |
+
- Provide proper attribution (e.g., credit to the original author).
|
| 22 |
+
|
| 23 |
+
5. **Disclaimer.**
|
| 24 |
+
The model is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement.
|
| 25 |
+
|
| 26 |
+
6. **Termination.**
|
| 27 |
+
This License and the rights granted hereunder will terminate automatically if you fail to comply with any of the terms or conditions. However, you may reinstate your rights by coming into compliance with the License.
|
| 28 |
+
|
| 29 |
+
## END OF TERMS AND CONDITIONS
|