Instructions to use KoboldAI/fairseq-dense-13B-Nerys with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KoboldAI/fairseq-dense-13B-Nerys with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KoboldAI/fairseq-dense-13B-Nerys")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("KoboldAI/fairseq-dense-13B-Nerys") model = AutoModelForCausalLM.from_pretrained("KoboldAI/fairseq-dense-13B-Nerys", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KoboldAI/fairseq-dense-13B-Nerys with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KoboldAI/fairseq-dense-13B-Nerys" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KoboldAI/fairseq-dense-13B-Nerys", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/KoboldAI/fairseq-dense-13B-Nerys
- SGLang
How to use KoboldAI/fairseq-dense-13B-Nerys 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 "KoboldAI/fairseq-dense-13B-Nerys" \ --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": "KoboldAI/fairseq-dense-13B-Nerys", "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 "KoboldAI/fairseq-dense-13B-Nerys" \ --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": "KoboldAI/fairseq-dense-13B-Nerys", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use KoboldAI/fairseq-dense-13B-Nerys with Docker Model Runner:
docker model run hf.co/KoboldAI/fairseq-dense-13B-Nerys
Julius ter Pelkwijk commited on
Commit ·
dfc3204
1
Parent(s): 07804a9
Adding model
Browse files- config.json +29 -0
- merges.txt +0 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +1 -0
- tokenizer_config.json +1 -0
- vocab.json +0 -0
config.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "KoboldAI/fairseq-dense-13B",
|
| 3 |
+
"activation_dropout": 0.0,
|
| 4 |
+
"activation_function": "gelu",
|
| 5 |
+
"architectures": [
|
| 6 |
+
"XGLMForCausalLM"
|
| 7 |
+
],
|
| 8 |
+
"attention_dropout": 0.1,
|
| 9 |
+
"attention_heads": 40,
|
| 10 |
+
"bos_token_id": 50257,
|
| 11 |
+
"d_model": 5120,
|
| 12 |
+
"decoder_start_token_id": 2,
|
| 13 |
+
"dropout": 0.1,
|
| 14 |
+
"eos_token_id": 50259,
|
| 15 |
+
"ffn_dim": 20480,
|
| 16 |
+
"init_std": 0.02,
|
| 17 |
+
"layerdrop": 0.0,
|
| 18 |
+
"max_position_embeddings": 2048,
|
| 19 |
+
"model_type": "xglm",
|
| 20 |
+
"newlinemode": "s",
|
| 21 |
+
"num_layers": 40,
|
| 22 |
+
"pad_token_id": 1,
|
| 23 |
+
"scale_embedding": true,
|
| 24 |
+
"tokenizer_class": "GPT2Tokenizer",
|
| 25 |
+
"torch_dtype": "float16",
|
| 26 |
+
"transformers_version": "4.18.0",
|
| 27 |
+
"use_cache": false,
|
| 28 |
+
"vocab_size": 50261
|
| 29 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cf2c054115933e90334ecabf9f805a8f7cc99583becc10b8e6d2c3740c147a13
|
| 3 |
+
size 25707041085
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "<|endoftext|>", "pad_token": "<pad>"}
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"errors": "replace", "unk_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "bos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "eos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "add_prefix_space": false, "special_tokens_map_file": "/root/.cache/huggingface/transformers/d62d75cc3a7250ada25f0a99e2741555d3712693661d5eef48b3fcbdd151d255.f4b0476f9d35aab16d5dd877dd9e5d547702eff96a3d808497c0d3fc36a32c99", "name_or_path": "KoboldAI/fairseq-dense-13B", "tokenizer_class": "GPT2Tokenizer"}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|