Instructions to use crumb/GLORT2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use crumb/GLORT2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="crumb/GLORT2", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("crumb/GLORT2", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use crumb/GLORT2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "crumb/GLORT2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "crumb/GLORT2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/crumb/GLORT2
- SGLang
How to use crumb/GLORT2 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 "crumb/GLORT2" \ --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": "crumb/GLORT2", "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 "crumb/GLORT2" \ --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": "crumb/GLORT2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use crumb/GLORT2 with Docker Model Runner:
docker model run hf.co/crumb/GLORT2
Upload model
Browse files- config.json +4 -3
- model.safetensors +1 -1
config.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"activation_function": "silu",
|
| 3 |
"architectures": [
|
| 4 |
"TransformerModelForCausalLM"
|
| 5 |
],
|
| 6 |
"auto_map": {
|
| 7 |
-
"AutoConfig": "modeling_t2.TransformerConfig",
|
| 8 |
-
"AutoModelForCausalLM": "modeling_t2.TransformerModelForCausalLM"
|
| 9 |
},
|
| 10 |
"bos_token_id": 1,
|
| 11 |
"combined_qkv": true,
|
|
@@ -28,6 +29,6 @@
|
|
| 28 |
"torch_dtype": "bfloat16",
|
| 29 |
"transformers_version": "4.36.2",
|
| 30 |
"use_bias": false,
|
| 31 |
-
"use_cache":
|
| 32 |
"vocab_size": 32000
|
| 33 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "crumb/GLORT2",
|
| 3 |
"activation_function": "silu",
|
| 4 |
"architectures": [
|
| 5 |
"TransformerModelForCausalLM"
|
| 6 |
],
|
| 7 |
"auto_map": {
|
| 8 |
+
"AutoConfig": "crumb/GLORT2--modeling_t2.TransformerConfig",
|
| 9 |
+
"AutoModelForCausalLM": "crumb/GLORT2--modeling_t2.TransformerModelForCausalLM"
|
| 10 |
},
|
| 11 |
"bos_token_id": 1,
|
| 12 |
"combined_qkv": true,
|
|
|
|
| 29 |
"torch_dtype": "bfloat16",
|
| 30 |
"transformers_version": "4.36.2",
|
| 31 |
"use_bias": false,
|
| 32 |
+
"use_cache": false,
|
| 33 |
"vocab_size": 32000
|
| 34 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 409219512
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c8a3bc4b79343257519ce964eefc05aed7ee15d8e8ff4ac7d1948eb418784ca1
|
| 3 |
size 409219512
|