Instructions to use temporary0-0name/run_opt1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use temporary0-0name/run_opt1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="temporary0-0name/run_opt1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("temporary0-0name/run_opt1") model = AutoModelForCausalLM.from_pretrained("temporary0-0name/run_opt1") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use temporary0-0name/run_opt1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "temporary0-0name/run_opt1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "temporary0-0name/run_opt1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/temporary0-0name/run_opt1
- SGLang
How to use temporary0-0name/run_opt1 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 "temporary0-0name/run_opt1" \ --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": "temporary0-0name/run_opt1", "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 "temporary0-0name/run_opt1" \ --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": "temporary0-0name/run_opt1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use temporary0-0name/run_opt1 with Docker Model Runner:
docker model run hf.co/temporary0-0name/run_opt1
Upload model
Browse files- README.md +1 -1
- config.json +1 -1
- generation_config.json +1 -1
- model.safetensors +1 -1
README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
---
|
| 2 |
-
base_model: temporary0-0name/rand_model
|
| 3 |
tags:
|
| 4 |
- generated_from_trainer
|
| 5 |
datasets:
|
| 6 |
- wikitext
|
|
|
|
| 7 |
model-index:
|
| 8 |
- name: run_opt1
|
| 9 |
results: []
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
tags:
|
| 3 |
- generated_from_trainer
|
| 4 |
datasets:
|
| 5 |
- wikitext
|
| 6 |
+
base_model: temporary0-0name/rand_model
|
| 7 |
model-index:
|
| 8 |
- name: run_opt1
|
| 9 |
results: []
|
config.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
| 19 |
"pad_token_id": 0,
|
| 20 |
"position_embedding_type": "absolute",
|
| 21 |
"torch_dtype": "float32",
|
| 22 |
-
"transformers_version": "4.
|
| 23 |
"type_vocab_size": 2,
|
| 24 |
"use_cache": true,
|
| 25 |
"vocab_size": 30522
|
|
|
|
| 19 |
"pad_token_id": 0,
|
| 20 |
"position_embedding_type": "absolute",
|
| 21 |
"torch_dtype": "float32",
|
| 22 |
+
"transformers_version": "4.38.2",
|
| 23 |
"type_vocab_size": 2,
|
| 24 |
"use_cache": true,
|
| 25 |
"vocab_size": 30522
|
generation_config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
"_from_model_config": true,
|
| 3 |
"pad_token_id": 0,
|
| 4 |
-
"transformers_version": "4.
|
| 5 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"_from_model_config": true,
|
| 3 |
"pad_token_id": 0,
|
| 4 |
+
"transformers_version": "4.38.2"
|
| 5 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 438080896
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:89e463734e024386916b23d9a992ff75199a08964bd613532429432541bb6e5f
|
| 3 |
size 438080896
|