Instructions to use kaizerBox/retnet-summarization_small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kaizerBox/retnet-summarization_small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kaizerBox/retnet-summarization_small")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("kaizerBox/retnet-summarization_small", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use kaizerBox/retnet-summarization_small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kaizerBox/retnet-summarization_small" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kaizerBox/retnet-summarization_small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/kaizerBox/retnet-summarization_small
- SGLang
How to use kaizerBox/retnet-summarization_small 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 "kaizerBox/retnet-summarization_small" \ --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": "kaizerBox/retnet-summarization_small", "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 "kaizerBox/retnet-summarization_small" \ --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": "kaizerBox/retnet-summarization_small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use kaizerBox/retnet-summarization_small with Docker Model Runner:
docker model run hf.co/kaizerBox/retnet-summarization_small
retnet-summarization_small
Browse files- README.md +6 -7
- config.json +1 -1
- generation_config.json +1 -1
- model.safetensors +1 -1
- runs/Nov15_20-01-19_dc2085b25b34/events.out.tfevents.1700078480.dc2085b25b34.233.0 +3 -0
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -16,7 +16,7 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 16 |
|
| 17 |
This model is a fine-tuned version of [kaizerBox/retnet-summarization_small](https://huggingface.co/kaizerBox/retnet-summarization_small) on the xsum dataset.
|
| 18 |
It achieves the following results on the evaluation set:
|
| 19 |
-
- Loss: 4.
|
| 20 |
|
| 21 |
## Model description
|
| 22 |
|
|
@@ -44,20 +44,19 @@ The following hyperparameters were used during training:
|
|
| 44 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 45 |
- lr_scheduler_type: cosine
|
| 46 |
- lr_scheduler_warmup_steps: 10
|
| 47 |
-
- num_epochs:
|
| 48 |
- mixed_precision_training: Native AMP
|
| 49 |
|
| 50 |
### Training results
|
| 51 |
|
| 52 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 53 |
|:-------------:|:-----:|:----:|:---------------:|
|
| 54 |
-
| 4.
|
| 55 |
-
| 4.3591 | 2.0 | 9220 | 4.1658 |
|
| 56 |
|
| 57 |
|
| 58 |
### Framework versions
|
| 59 |
|
| 60 |
-
- Transformers 4.35.
|
| 61 |
- Pytorch 2.1.0+cu118
|
| 62 |
-
- Datasets 2.14.
|
| 63 |
-
- Tokenizers 0.
|
|
|
|
| 16 |
|
| 17 |
This model is a fine-tuned version of [kaizerBox/retnet-summarization_small](https://huggingface.co/kaizerBox/retnet-summarization_small) on the xsum dataset.
|
| 18 |
It achieves the following results on the evaluation set:
|
| 19 |
+
- Loss: 4.1604
|
| 20 |
|
| 21 |
## Model description
|
| 22 |
|
|
|
|
| 44 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 45 |
- lr_scheduler_type: cosine
|
| 46 |
- lr_scheduler_warmup_steps: 10
|
| 47 |
+
- num_epochs: 1
|
| 48 |
- mixed_precision_training: Native AMP
|
| 49 |
|
| 50 |
### Training results
|
| 51 |
|
| 52 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 53 |
|:-------------:|:-----:|:----:|:---------------:|
|
| 54 |
+
| 4.3639 | 1.0 | 4610 | 4.1604 |
|
|
|
|
| 55 |
|
| 56 |
|
| 57 |
### Framework versions
|
| 58 |
|
| 59 |
+
- Transformers 4.35.2
|
| 60 |
- Pytorch 2.1.0+cu118
|
| 61 |
+
- Datasets 2.14.7
|
| 62 |
+
- Tokenizers 0.15.0
|
config.json
CHANGED
|
@@ -28,7 +28,7 @@
|
|
| 28 |
"subln": true,
|
| 29 |
"tie_word_embeddings": false,
|
| 30 |
"torch_dtype": "float32",
|
| 31 |
-
"transformers_version": "4.35.
|
| 32 |
"use_cache": true,
|
| 33 |
"use_ffn_rms_norm": false,
|
| 34 |
"use_glu": true,
|
|
|
|
| 28 |
"subln": true,
|
| 29 |
"tie_word_embeddings": false,
|
| 30 |
"torch_dtype": "float32",
|
| 31 |
+
"transformers_version": "4.35.2",
|
| 32 |
"use_cache": true,
|
| 33 |
"use_ffn_rms_norm": false,
|
| 34 |
"use_glu": true,
|
generation_config.json
CHANGED
|
@@ -2,5 +2,5 @@
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"eos_token_id": 50256,
|
| 4 |
"pad_token_id": 50257,
|
| 5 |
-
"transformers_version": "4.35.
|
| 6 |
}
|
|
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"eos_token_id": 50256,
|
| 4 |
"pad_token_id": 50257,
|
| 5 |
+
"transformers_version": "4.35.2"
|
| 6 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 53857264
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:830139f85933b4cdbb188d7a830804e191c2c03328df46182e6d7bb877c50812
|
| 3 |
size 53857264
|
runs/Nov15_20-01-19_dc2085b25b34/events.out.tfevents.1700078480.dc2085b25b34.233.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c94f5cadc3711f4180257d8bda2bf6d13f8696c35ccba3119db967aa6203d1c8
|
| 3 |
+
size 5383
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4600
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d173b57ff3ab32ed683cadaa60966f98a5dc0c1dd6918d53f6d1567488849aad
|
| 3 |
size 4600
|