Instructions to use BreadAi/DiscordPy with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BreadAi/DiscordPy with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BreadAi/DiscordPy")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("BreadAi/DiscordPy") model = AutoModelForCausalLM.from_pretrained("BreadAi/DiscordPy") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use BreadAi/DiscordPy with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BreadAi/DiscordPy" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BreadAi/DiscordPy", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/BreadAi/DiscordPy
- SGLang
How to use BreadAi/DiscordPy 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 "BreadAi/DiscordPy" \ --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": "BreadAi/DiscordPy", "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 "BreadAi/DiscordPy" \ --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": "BreadAi/DiscordPy", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use BreadAi/DiscordPy with Docker Model Runner:
docker model run hf.co/BreadAi/DiscordPy
Commit ·
15da977
1
Parent(s): f379b29
Upload 5 files
Browse files- config.json +25 -18
- generation_config.json +2 -2
- merges.txt +0 -0
- pytorch_model.bin +2 -2
- vocab.json +0 -0
config.json
CHANGED
|
@@ -1,26 +1,33 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
|
|
|
| 3 |
"architectures": [
|
| 4 |
-
"
|
| 5 |
],
|
| 6 |
-
"
|
| 7 |
-
"
|
| 8 |
-
"
|
| 9 |
-
"
|
| 10 |
"initializer_range": 0.02,
|
| 11 |
-
"
|
| 12 |
-
"
|
| 13 |
-
"
|
| 14 |
-
"
|
| 15 |
-
"
|
| 16 |
-
"
|
| 17 |
-
"
|
| 18 |
-
"
|
| 19 |
-
"
|
| 20 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
"torch_dtype": "float32",
|
| 22 |
"transformers_version": "4.26.1",
|
| 23 |
"use_cache": true,
|
| 24 |
-
"
|
| 25 |
-
"vocab_size": 50304
|
| 26 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "cerebras/Cerebras-GPT-256M",
|
| 3 |
+
"activation_function": "gelu",
|
| 4 |
"architectures": [
|
| 5 |
+
"GPT2LMHeadModel"
|
| 6 |
],
|
| 7 |
+
"attn_pdrop": 0.0,
|
| 8 |
+
"bos_token_id": 50256,
|
| 9 |
+
"embd_pdrop": 0.0,
|
| 10 |
+
"eos_token_id": 50256,
|
| 11 |
"initializer_range": 0.02,
|
| 12 |
+
"layer_norm_epsilon": 1e-05,
|
| 13 |
+
"line_by_line": false,
|
| 14 |
+
"model_type": "gpt2",
|
| 15 |
+
"n_embd": 1088,
|
| 16 |
+
"n_head": 17,
|
| 17 |
+
"n_inner": 4352,
|
| 18 |
+
"n_layer": 14,
|
| 19 |
+
"n_positions": 2048,
|
| 20 |
+
"reorder_and_upcast_attn": false,
|
| 21 |
+
"resid_pdrop": 0.0,
|
| 22 |
+
"scale_attn_by_inverse_layer_idx": false,
|
| 23 |
+
"scale_attn_weights": true,
|
| 24 |
+
"summary_activation": null,
|
| 25 |
+
"summary_first_dropout": 0.1,
|
| 26 |
+
"summary_proj_to_labels": true,
|
| 27 |
+
"summary_type": "cls_index",
|
| 28 |
+
"summary_use_proj": true,
|
| 29 |
"torch_dtype": "float32",
|
| 30 |
"transformers_version": "4.26.1",
|
| 31 |
"use_cache": true,
|
| 32 |
+
"vocab_size": 50257
|
|
|
|
| 33 |
}
|
generation_config.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"_from_model_config": true,
|
| 3 |
-
"bos_token_id":
|
| 4 |
-
"eos_token_id":
|
| 5 |
"transformers_version": "4.26.1"
|
| 6 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 50256,
|
| 4 |
+
"eos_token_id": 50256,
|
| 5 |
"transformers_version": "4.26.1"
|
| 6 |
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7e0b35c41e04803c309d509d75183e085279c41b19afad991d81125cbc6ed925
|
| 3 |
+
size 1082693357
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|