Instructions to use ShaneEP77/tolkientexts with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ShaneEP77/tolkientexts with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ShaneEP77/tolkientexts")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ShaneEP77/tolkientexts") model = AutoModelForCausalLM.from_pretrained("ShaneEP77/tolkientexts") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ShaneEP77/tolkientexts with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ShaneEP77/tolkientexts" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ShaneEP77/tolkientexts", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ShaneEP77/tolkientexts
- SGLang
How to use ShaneEP77/tolkientexts 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 "ShaneEP77/tolkientexts" \ --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": "ShaneEP77/tolkientexts", "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 "ShaneEP77/tolkientexts" \ --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": "ShaneEP77/tolkientexts", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ShaneEP77/tolkientexts with Docker Model Runner:
docker model run hf.co/ShaneEP77/tolkientexts
Delete ds_config.json
Browse files- ds_config.json +0 -50
ds_config.json
DELETED
|
@@ -1,50 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"fp16": {
|
| 3 |
-
"enabled": "auto",
|
| 4 |
-
"loss_scale": 0,
|
| 5 |
-
"loss_scale_window": 1000,
|
| 6 |
-
"initial_scale_power": 16,
|
| 7 |
-
"hysteresis": 2,
|
| 8 |
-
"min_loss_scale": 1
|
| 9 |
-
},
|
| 10 |
-
"optimizer": {
|
| 11 |
-
"type": "AdamW",
|
| 12 |
-
"params": {
|
| 13 |
-
"lr": "auto",
|
| 14 |
-
"betas": "auto",
|
| 15 |
-
"eps": "auto",
|
| 16 |
-
"weight_decay": "auto"
|
| 17 |
-
}
|
| 18 |
-
},
|
| 19 |
-
"scheduler": {
|
| 20 |
-
"type": "WarmupLR",
|
| 21 |
-
"params": {
|
| 22 |
-
"warmup_min_lr": "auto",
|
| 23 |
-
"warmup_max_lr": "auto",
|
| 24 |
-
"warmup_num_steps": "auto"
|
| 25 |
-
}
|
| 26 |
-
},
|
| 27 |
-
"zero_optimization": {
|
| 28 |
-
"stage": 3,
|
| 29 |
-
"allgather_partitions": true,
|
| 30 |
-
"allgather_bucket_size": 2e8,
|
| 31 |
-
"overlap_comm": true,
|
| 32 |
-
"reduce_scatter": true,
|
| 33 |
-
"reduce_bucket_size": 2e8,
|
| 34 |
-
"contiguous_gradients": true,
|
| 35 |
-
"offload_optimizer": {
|
| 36 |
-
"device": "cpu"
|
| 37 |
-
},
|
| 38 |
-
"offload_param": {
|
| 39 |
-
"device": "cpu"
|
| 40 |
-
},
|
| 41 |
-
"stage3_gather_16bit_weights_on_model_save": true
|
| 42 |
-
},
|
| 43 |
-
"gradient_accumulation_steps": "auto",
|
| 44 |
-
"gradient_clipping": "auto",
|
| 45 |
-
"communication_data_type": "fp32",
|
| 46 |
-
"steps_per_print": 1000000000000000,
|
| 47 |
-
"train_batch_size": "auto",
|
| 48 |
-
"train_micro_batch_size_per_gpu": "auto",
|
| 49 |
-
"wall_clock_breakdown": false
|
| 50 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|