Text Generation
Transformers
Safetensors
English
German
llama
goliath
deutsch
llama2
discoresearch
text-generation-inference
Instructions to use DiscoResearch/DiscoLM-70b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DiscoResearch/DiscoLM-70b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DiscoResearch/DiscoLM-70b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DiscoResearch/DiscoLM-70b") model = AutoModelForCausalLM.from_pretrained("DiscoResearch/DiscoLM-70b") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use DiscoResearch/DiscoLM-70b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DiscoResearch/DiscoLM-70b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DiscoResearch/DiscoLM-70b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/DiscoResearch/DiscoLM-70b
- SGLang
How to use DiscoResearch/DiscoLM-70b 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 "DiscoResearch/DiscoLM-70b" \ --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": "DiscoResearch/DiscoLM-70b", "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 "DiscoResearch/DiscoLM-70b" \ --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": "DiscoResearch/DiscoLM-70b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use DiscoResearch/DiscoLM-70b with Docker Model Runner:
docker model run hf.co/DiscoResearch/DiscoLM-70b
Fix Stop Tokens
#2
by CyberTimon - opened
- config.json +2 -2
- tokenizer_config.json +1 -1
config.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
| 6 |
"attention_bias": false,
|
| 7 |
-
"bos_token_id":
|
| 8 |
-
"eos_token_id":
|
| 9 |
"hidden_act": "silu",
|
| 10 |
"hidden_size": 8192,
|
| 11 |
"initializer_range": 0.02,
|
|
|
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
| 6 |
"attention_bias": false,
|
| 7 |
+
"bos_token_id": 32001,
|
| 8 |
+
"eos_token_id": 32000,
|
| 9 |
"hidden_act": "silu",
|
| 10 |
"hidden_size": 8192,
|
| 11 |
"initializer_range": 0.02,
|
tokenizer_config.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"add_bos_token": true,
|
| 3 |
-
"add_eos_token":
|
| 4 |
"added_tokens_decoder": {
|
| 5 |
"0": {
|
| 6 |
"content": "<unk>",
|
|
|
|
| 1 |
{
|
| 2 |
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": true,
|
| 4 |
"added_tokens_decoder": {
|
| 5 |
"0": {
|
| 6 |
"content": "<unk>",
|