Text Generation
Transformers
Safetensors
t5
text2text-generation
icd
historical-demography
digital-humanities
multi-label
text-generation-inference
Instructions to use codllm/codllm-base-deploy with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use codllm/codllm-base-deploy with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="codllm/codllm-base-deploy")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("codllm/codllm-base-deploy") model = AutoModelForSeq2SeqLM.from_pretrained("codllm/codllm-base-deploy", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use codllm/codllm-base-deploy with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "codllm/codllm-base-deploy" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "codllm/codllm-base-deploy", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/codllm/codllm-base-deploy
- SGLang
How to use codllm/codllm-base-deploy 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 "codllm/codllm-base-deploy" \ --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": "codllm/codllm-base-deploy", "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 "codllm/codllm-base-deploy" \ --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": "codllm/codllm-base-deploy", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use codllm/codllm-base-deploy with Docker Model Runner:
docker model run hf.co/codllm/codllm-base-deploy
Upload generation_config.json with huggingface_hub
Browse files- generation_config.json +37 -0
generation_config.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": false,
|
| 3 |
+
"assistant_confidence_threshold": 0.4,
|
| 4 |
+
"assistant_lookbehind": 10,
|
| 5 |
+
"decoder_start_token_id": 0,
|
| 6 |
+
"diversity_penalty": 0.0,
|
| 7 |
+
"do_sample": false,
|
| 8 |
+
"early_stopping": false,
|
| 9 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 10 |
+
"encoder_repetition_penalty": 1.0,
|
| 11 |
+
"eos_token_id": [
|
| 12 |
+
1
|
| 13 |
+
],
|
| 14 |
+
"epsilon_cutoff": 0.0,
|
| 15 |
+
"eta_cutoff": 0.0,
|
| 16 |
+
"length_penalty": 1.0,
|
| 17 |
+
"max_length": 20,
|
| 18 |
+
"min_length": 0,
|
| 19 |
+
"no_repeat_ngram_size": 0,
|
| 20 |
+
"num_assistant_tokens": 20,
|
| 21 |
+
"num_assistant_tokens_schedule": "constant",
|
| 22 |
+
"num_beam_groups": 1,
|
| 23 |
+
"num_beams": 1,
|
| 24 |
+
"num_return_sequences": 1,
|
| 25 |
+
"output_scores": false,
|
| 26 |
+
"pad_token_id": 0,
|
| 27 |
+
"remove_invalid_values": false,
|
| 28 |
+
"repetition_penalty": 1.0,
|
| 29 |
+
"return_dict_in_generate": false,
|
| 30 |
+
"target_lookbehind": 10,
|
| 31 |
+
"temperature": 1.0,
|
| 32 |
+
"top_k": 50,
|
| 33 |
+
"top_p": 1.0,
|
| 34 |
+
"transformers_version": "5.1.0",
|
| 35 |
+
"typical_p": 1.0,
|
| 36 |
+
"use_cache": true
|
| 37 |
+
}
|