Run this model with HF Jobs
Run kaizerBox/retnet-xsum on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/kaizerBox/retnet-xsum. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/kaizerBox/retnet-xsum on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/kaizerBox/retnet-xsum. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/kaizerBox/retnet-xsum. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use kaizerBox/retnet-xsum with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kaizerBox/retnet-xsum with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kaizerBox/retnet-xsum")# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("kaizerBox/retnet-xsum", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use kaizerBox/retnet-xsum with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kaizerBox/retnet-xsum" # 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-xsum", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/kaizerBox/retnet-xsum
- SGLang
How to use kaizerBox/retnet-xsum 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-xsum" \ --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-xsum", "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-xsum" \ --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-xsum", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use kaizerBox/retnet-xsum with Docker Model Runner:
docker model run hf.co/kaizerBox/retnet-xsum
retnet-xsum_model_70k-28_1M
Browse filesFiles changed (7)
14 unmodified lines1516171819202113 unmodified lines3536373839404142434445464748495051525354555657585960616263646514 unmodified linesThis model is a fine-tuned version of [](https://huggingface.co/) on the xsum dataset.It achieves the following results on the evaluation set:- Loss: 4.5288## Model description13 unmodified linesThe following hyperparameters were used during training:- learning_rate: 0.0006- train_batch_size: 1- eval_batch_size: 1- seed: 42- gradient_accumulation_steps: 4- total_train_batch_size: 4- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: cosine- lr_scheduler_warmup_steps: 10- num_epochs: 10- mixed_precision_training: Native AMP### Training results| Training Loss | Epoch | Step | Validation Loss ||:-------------:|:-----:|:-----:|:---------------:|| 5.5013 | 1.0 | 2500 | 4.8933 || 4.5772 | 2.0 | 5000 | 4.5701 || 4.1583 | 3.0 | 7500 | 4.4502 || 3.8363 | 4.0 | 10000 | 4.3856 || 3.5506 | 5.0 | 12500 | 4.3816 || 3.2924 | 6.0 | 15000 | 4.4053 || 3.0678 | 7.0 | 17500 | 4.4400 || 2.8893 | 8.0 | 20000 | 4.4869 || 2.7668 | 9.0 | 22500 | 4.5172 || 2.7036 | 10.0 | 25000 | 4.5288 |### Framework versions14 unmodified lines1516171819202113 unmodified lines353637383940414243444546474849505152535455565758596061626314 unmodified linesThis model is a fine-tuned version of [](https://huggingface.co/) on the xsum dataset.It achieves the following results on the evaluation set:- Loss: 4.0200## Model description13 unmodified linesThe following hyperparameters were used during training:- learning_rate: 0.0006- train_batch_size: 8- eval_batch_size: 8- seed: 42- gradient_accumulation_steps: 4- total_train_batch_size: 32- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: cosine- lr_scheduler_warmup_steps: 10- num_epochs: 8- mixed_precision_training: Native AMP### Training results| Training Loss | Epoch | Step | Validation Loss ||:-------------:|:-----:|:-----:|:---------------:|| 5.3257 | 1.0 | 2187 | 4.6412 || 4.5863 | 2.0 | 4375 | 4.3474 || 4.3703 | 3.0 | 6562 | 4.2111 || 4.2404 | 4.0 | 8750 | 4.1213 || 4.1568 | 5.0 | 10937 | 4.0673 || 4.0975 | 6.0 | 13125 | 4.0371 || 4.0618 | 7.0 | 15312 | 4.0219 || 4.045 | 8.0 | 17496 | 4.0200 |### Framework versions
12345678910111213141516175 unmodified lines23242526272829{"activation_dropout": 0.0,"activation_fn": "swish","architectures": ["RetNetForCausalLM"],"decoder_embed_dim": 512,"decoder_ffn_embed_dim": 864,"decoder_layers": 4,"decoder_normalize_before": true,"decoder_retention_heads": 2,"decoder_value_embed_dim": 864,"deepnorm": false,"drop_path_rate": 0.0,"dropout": 0.1,"eos_token_id": 50256,"forward_impl": "parallel",5 unmodified lines"no_scale_embedding": false,"output_retentions": false,"pad_token_id": 50257,"recurrent_chunk_size": 512,"subln": true,"tie_word_embeddings": false,"torch_dtype": "float32",12345678910111213141516175 unmodified lines23242526272829{"activation_dropout": 0.1,"activation_fn": "swish","architectures": ["RetNetForCausalLM"],"decoder_embed_dim": 256,"decoder_ffn_embed_dim": 432,"decoder_layers": 3,"decoder_normalize_before": true,"decoder_retention_heads": 2,"decoder_value_embed_dim": 432,"deepnorm": false,"drop_path_rate": 0.1,"dropout": 0.1,"eos_token_id": 50256,"forward_impl": "parallel",5 unmodified lines"no_scale_embedding": false,"output_retentions": false,"pad_token_id": 50257,"recurrent_chunk_size": 256,"subln": true,"tie_word_embeddings": false,"torch_dtype": "float32",
123version https://git-lfs.github.com/spec/v1oid sha256:26e8b5ce8a75937cbe2bfedd62db58c48a622baaf6948a10dfc5afd7e4d65e2csize 256743288123version https://git-lfs.github.com/spec/v1oid sha256:ec44e3271173c6e75a66acc989aa19a83850d775155a5a968a248b07ee0cd3dasize 112478520
123version https://git-lfs.github.com/spec/v1oid sha256:6c8681c92acdca48d5c00bced2a5e295a7e8f1e94892319125a30623875b8a0dsize 8207123version https://git-lfs.github.com/spec/v1oid sha256:e0462915650419b4b9e2fe38a407d605f91531f643c1f577bc213d80f880a3cfsize 3641234567{"version": "1.0","truncation": null,"padding": null,"added_tokens": [{"id": 50256,12345678910111213141516{"version": "1.0","truncation": null,"padding": {"strategy": {"Fixed": 1024},"direction": "Right","pad_to_multiple_of": null,"pad_id": 50257,"pad_type_id": 0,"pad_token": "<|pad|>"},"added_tokens": [{"id": 50256,
123version https://git-lfs.github.com/spec/v1oid sha256:8f079f397e15b5a36b5952f2298243ba98bc70f542dda8e1bebe1c8869c260ccsize 4536123version https://git-lfs.github.com/spec/v1oid sha256:011be80e171330f986658f62208876e42ea8718c3e05fb87230fcb064c1711b8size 4536
README.md+13-15
config.json+7-7
model.safetensors+2-2
runs/Nov03_22-11-48_cbf29f69c7ee/events.out.tfevents.1699049509.cbf29f69c7ee.2454.0Added+3
runs/Nov03_22-11-48_cbf29f69c7ee/events.out.tfevents.1699067684.cbf29f69c7ee.2454.1Added+3
tokenizer.json+10-1
training_args.bin+1-1