Instructions to use EldritchLavender/SpookieBrain with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EldritchLavender/SpookieBrain with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="EldritchLavender/SpookieBrain")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("EldritchLavender/SpookieBrain") model = AutoModelForCausalLM.from_pretrained("EldritchLavender/SpookieBrain") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use EldritchLavender/SpookieBrain with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "EldritchLavender/SpookieBrain" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EldritchLavender/SpookieBrain", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/EldritchLavender/SpookieBrain
- SGLang
How to use EldritchLavender/SpookieBrain 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 "EldritchLavender/SpookieBrain" \ --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": "EldritchLavender/SpookieBrain", "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 "EldritchLavender/SpookieBrain" \ --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": "EldritchLavender/SpookieBrain", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use EldritchLavender/SpookieBrain with Docker Model Runner:
docker model run hf.co/EldritchLavender/SpookieBrain
Upload 4 files
Browse files- config.json +2 -1
- generation_config.json +1 -1
- model.safetensors +1 -1
- tokenizer_config.json +0 -1
config.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"activation_function": "gelu_new",
|
| 3 |
"architectures": [
|
| 4 |
"GPT2LMHeadModel"
|
|
@@ -32,7 +33,7 @@
|
|
| 32 |
}
|
| 33 |
},
|
| 34 |
"torch_dtype": "float32",
|
| 35 |
-
"transformers_version": "4.
|
| 36 |
"use_cache": true,
|
| 37 |
"vocab_size": 50257
|
| 38 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "./gpt2_finetuned",
|
| 3 |
"activation_function": "gelu_new",
|
| 4 |
"architectures": [
|
| 5 |
"GPT2LMHeadModel"
|
|
|
|
| 33 |
}
|
| 34 |
},
|
| 35 |
"torch_dtype": "float32",
|
| 36 |
+
"transformers_version": "4.46.2",
|
| 37 |
"use_cache": true,
|
| 38 |
"vocab_size": 50257
|
| 39 |
}
|
generation_config.json
CHANGED
|
@@ -2,5 +2,5 @@
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 50256,
|
| 4 |
"eos_token_id": 50256,
|
| 5 |
-
"transformers_version": "4.
|
| 6 |
}
|
|
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 50256,
|
| 4 |
"eos_token_id": 50256,
|
| 5 |
+
"transformers_version": "4.46.2"
|
| 6 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 497774208
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ff433b3700b3b5e33c6bc6c3fdc2f4ada7e62382fec8249744b3d5f74a7803e
|
| 3 |
size 497774208
|
tokenizer_config.json
CHANGED
|
@@ -15,7 +15,6 @@
|
|
| 15 |
"clean_up_tokenization_spaces": true,
|
| 16 |
"eos_token": "<|endoftext|>",
|
| 17 |
"errors": "replace",
|
| 18 |
-
"extra_special_tokens": {},
|
| 19 |
"model_max_length": 1024,
|
| 20 |
"pad_token": "<|endoftext|>",
|
| 21 |
"tokenizer_class": "GPT2Tokenizer",
|
|
|
|
| 15 |
"clean_up_tokenization_spaces": true,
|
| 16 |
"eos_token": "<|endoftext|>",
|
| 17 |
"errors": "replace",
|
|
|
|
| 18 |
"model_max_length": 1024,
|
| 19 |
"pad_token": "<|endoftext|>",
|
| 20 |
"tokenizer_class": "GPT2Tokenizer",
|