Text Generation
Transformers
Safetensors
text generation
Deci AI
DeciCoder
custom_code
Eval Results (legacy)
Instructions to use jradchenko/DeciCoder-1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jradchenko/DeciCoder-1b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jradchenko/DeciCoder-1b", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("jradchenko/DeciCoder-1b", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use jradchenko/DeciCoder-1b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jradchenko/DeciCoder-1b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jradchenko/DeciCoder-1b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/jradchenko/DeciCoder-1b
- SGLang
How to use jradchenko/DeciCoder-1b 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 "jradchenko/DeciCoder-1b" \ --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": "jradchenko/DeciCoder-1b", "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 "jradchenko/DeciCoder-1b" \ --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": "jradchenko/DeciCoder-1b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use jradchenko/DeciCoder-1b with Docker Model Runner:
docker model run hf.co/jradchenko/DeciCoder-1b
jon commited on
Commit ·
3f24127
1
Parent(s): 20cdc2b
ctranslate2
Browse files- config.json +5 -3
- configuration_decicoder.py → configuration_llama.py +1 -1
- ctranslate2/config.json +6 -0
- ctranslate2/model.bin +3 -0
- ctranslate2/vocabulary.json +0 -0
- tabby.json +3 -0
config.json
CHANGED
|
@@ -3,8 +3,10 @@
|
|
| 3 |
"DeciCoderForCausalLM"
|
| 4 |
],
|
| 5 |
"auto_map": {
|
| 6 |
-
"AutoConfig": "
|
| 7 |
-
"
|
|
|
|
|
|
|
| 8 |
},
|
| 9 |
"bos_token_id": 0,
|
| 10 |
"eos_token_id": 0,
|
|
@@ -25,4 +27,4 @@
|
|
| 25 |
"transformers_version": "4.31.0.dev0",
|
| 26 |
"use_cache": true,
|
| 27 |
"vocab_size": 49152
|
| 28 |
-
}
|
|
|
|
| 3 |
"DeciCoderForCausalLM"
|
| 4 |
],
|
| 5 |
"auto_map": {
|
| 6 |
+
"AutoConfig": "configuration_llama.LlamaConfig",
|
| 7 |
+
"AutoModel": "modeling_llama.LlamaModel",
|
| 8 |
+
"AutoModelForCausalLM": "modeling_llama.LlamaForCausalLM",
|
| 9 |
+
"AutoModelForSequenceClassification": "modeling_llama.LlamaForSequenceClassification"
|
| 10 |
},
|
| 11 |
"bos_token_id": 0,
|
| 12 |
"eos_token_id": 0,
|
|
|
|
| 27 |
"transformers_version": "4.31.0.dev0",
|
| 28 |
"use_cache": true,
|
| 29 |
"vocab_size": 49152
|
| 30 |
+
}
|
configuration_decicoder.py → configuration_llama.py
RENAMED
|
@@ -13,7 +13,7 @@ logger = logging.get_logger(__name__)
|
|
| 13 |
LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP = {}
|
| 14 |
|
| 15 |
|
| 16 |
-
class
|
| 17 |
r"""
|
| 18 |
This is the configuration class to store the configuration of a [`LlamaModel`]. It is used to instantiate an LLaMA
|
| 19 |
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
|
|
|
|
| 13 |
LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP = {}
|
| 14 |
|
| 15 |
|
| 16 |
+
class LlamaConfig(LlamaConfig):
|
| 17 |
r"""
|
| 18 |
This is the configuration class to store the configuration of a [`LlamaModel`]. It is used to instantiate an LLaMA
|
| 19 |
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
|
ctranslate2/config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<|endoftext|>",
|
| 3 |
+
"eos_token": "<|endoftext|>",
|
| 4 |
+
"layer_norm_epsilon": 1e-05,
|
| 5 |
+
"unk_token": "<|endoftext|>"
|
| 6 |
+
}
|
ctranslate2/model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d15385c0845adf975befc076f7eafd3a12059e0a89f3d18cd24b6610a5f66edb
|
| 3 |
+
size 2227193677
|
ctranslate2/vocabulary.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tabby.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"auto_model": "AutoModelForCausalLM"
|
| 3 |
+
}
|