Instructions to use temporary0-0name/pretrained_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use temporary0-0name/pretrained_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="temporary0-0name/pretrained_model")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("temporary0-0name/pretrained_model") model = AutoModelForCausalLM.from_pretrained("temporary0-0name/pretrained_model") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use temporary0-0name/pretrained_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "temporary0-0name/pretrained_model" # 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/pretrained_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/temporary0-0name/pretrained_model
- SGLang
How to use temporary0-0name/pretrained_model 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/pretrained_model" \ --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/pretrained_model", "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/pretrained_model" \ --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/pretrained_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use temporary0-0name/pretrained_model with Docker Model Runner:
docker model run hf.co/temporary0-0name/pretrained_model
Commit ·
47f9fa4
1
Parent(s): e1e4b67
Training in progress, step 100
Browse files- config.json +1 -1
- model.safetensors +1 -1
- runs/Nov18_14-32-49_bdcc79452b0f/events.out.tfevents.1700317972.bdcc79452b0f.1420.0 +3 -0
- runs/Nov18_14-35-25_bdcc79452b0f/events.out.tfevents.1700318128.bdcc79452b0f.1420.1 +3 -0
- runs/Nov18_14-37-49_bdcc79452b0f/events.out.tfevents.1700318272.bdcc79452b0f.5253.0 +3 -0
- runs/Nov18_14-38-39_bdcc79452b0f/events.out.tfevents.1700318325.bdcc79452b0f.5253.1 +3 -0
- tokenizer.json +16 -2
- training_args.bin +3 -0
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
"architectures": [
|
| 4 |
"BertLMHeadModel"
|
| 5 |
],
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "temporary0-0name/pretrained_model",
|
| 3 |
"architectures": [
|
| 4 |
"BertLMHeadModel"
|
| 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:e16a34057f9d82b526d446db07844ca916f72672a8a0c013233bb9fccfd50097
|
| 3 |
size 438080896
|
runs/Nov18_14-32-49_bdcc79452b0f/events.out.tfevents.1700317972.bdcc79452b0f.1420.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cc7784f40dda1a285bfd674902c5810698e6ccfe779737ca0674e9b54e20a23a
|
| 3 |
+
size 4250
|
runs/Nov18_14-35-25_bdcc79452b0f/events.out.tfevents.1700318128.bdcc79452b0f.1420.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a4b1c08099afb8866182a26d1fb8b93d50b0174f131fd57ab51a8f1608460893
|
| 3 |
+
size 4184
|
runs/Nov18_14-37-49_bdcc79452b0f/events.out.tfevents.1700318272.bdcc79452b0f.5253.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d0338356074ea1f2c8a77ead53a969587bfb9f7b8697f4e1f01cfd498a6bef08
|
| 3 |
+
size 4250
|
runs/Nov18_14-38-39_bdcc79452b0f/events.out.tfevents.1700318325.bdcc79452b0f.5253.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:19376338d6a357499691a7cdee1722d01e34c12d64881ad7e2751fd6faceab14
|
| 3 |
+
size 4669
|
tokenizer.json
CHANGED
|
@@ -1,7 +1,21 @@
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
-
"truncation":
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
"added_tokens": [
|
| 6 |
{
|
| 7 |
"id": 0,
|
|
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
+
"truncation": {
|
| 4 |
+
"direction": "Right",
|
| 5 |
+
"max_length": 128,
|
| 6 |
+
"strategy": "LongestFirst",
|
| 7 |
+
"stride": 0
|
| 8 |
+
},
|
| 9 |
+
"padding": {
|
| 10 |
+
"strategy": {
|
| 11 |
+
"Fixed": 128
|
| 12 |
+
},
|
| 13 |
+
"direction": "Right",
|
| 14 |
+
"pad_to_multiple_of": null,
|
| 15 |
+
"pad_id": 0,
|
| 16 |
+
"pad_type_id": 0,
|
| 17 |
+
"pad_token": "[PAD]"
|
| 18 |
+
},
|
| 19 |
"added_tokens": [
|
| 20 |
{
|
| 21 |
"id": 0,
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f7b75efdd94d16ad52d81f6f650383cbe510f1685bf6c742ca2abfe59373d960
|
| 3 |
+
size 4536
|