Instructions to use AISE-TUDelft/Custom-Activations-GPT-PReLU with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AISE-TUDelft/Custom-Activations-GPT-PReLU with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AISE-TUDelft/Custom-Activations-GPT-PReLU")# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("AISE-TUDelft/Custom-Activations-GPT-PReLU", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AISE-TUDelft/Custom-Activations-GPT-PReLU with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AISE-TUDelft/Custom-Activations-GPT-PReLU" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AISE-TUDelft/Custom-Activations-GPT-PReLU", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AISE-TUDelft/Custom-Activations-GPT-PReLU
- SGLang
How to use AISE-TUDelft/Custom-Activations-GPT-PReLU 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 "AISE-TUDelft/Custom-Activations-GPT-PReLU" \ --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": "AISE-TUDelft/Custom-Activations-GPT-PReLU", "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 "AISE-TUDelft/Custom-Activations-GPT-PReLU" \ --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": "AISE-TUDelft/Custom-Activations-GPT-PReLU", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AISE-TUDelft/Custom-Activations-GPT-PReLU with Docker Model Runner:
docker model run hf.co/AISE-TUDelft/Custom-Activations-GPT-PReLU
Download config.json from AISE-TUDelft/Custom-Activations-GPT-PReLU: direct link, hf CLI and curl.
- Browser
- Download file 966 Bytes
-
https://huggingface.co/AISE-TUDelft/Custom-Activations-GPT-PReLU/resolve/main/config.json
- Command line
-
hf download hf://AISE-TUDelft/Custom-Activations-GPT-PReLU/config.json
-
curl -L -o config.json https://huggingface.co/AISE-TUDelft/Custom-Activations-GPT-PReLU/resolve/main/config.json
966 Bytes
| { | |
| "_name_or_path": "c:\\Users\\Filip\\Documents\\School\\Delft\\Research project\\results\\upload\\GPT-PReLU", | |
| "activation_function": "gelu_new", | |
| "architectures": [ | |
| "ActivationsGPTNeoForCausalLM" | |
| ], | |
| "attention_dropout": 0.0, | |
| "attention_layers": [ | |
| "global", | |
| "local" | |
| ], | |
| "attention_types": [ | |
| [ | |
| [ | |
| "global", | |
| "local" | |
| ], | |
| 1 | |
| ] | |
| ], | |
| "bos_token_id": 50256, | |
| "classifier_dropout": 0.1, | |
| "custom_activation": "prelu", | |
| "embed_dropout": 0.0, | |
| "eos_token_id": 50256, | |
| "hidden_size": 512, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 1024, | |
| "layer_norm_epsilon": 1e-05, | |
| "max_position_embeddings": 512, | |
| "model_type": "activations_gpt_neo", | |
| "num_heads": 4, | |
| "num_layers": 2, | |
| "pad_token_id": 0, | |
| "resid_dropout": 0.0, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.26.1", | |
| "use_cache": true, | |
| "vocab_size": 10000, | |
| "window_size": 256 | |
| } | |