Instructions to use pszemraj/flan-t5-xl-summary-map-reduce-1024 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pszemraj/flan-t5-xl-summary-map-reduce-1024 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pszemraj/flan-t5-xl-summary-map-reduce-1024")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("pszemraj/flan-t5-xl-summary-map-reduce-1024") model = AutoModelForSeq2SeqLM.from_pretrained("pszemraj/flan-t5-xl-summary-map-reduce-1024", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use pszemraj/flan-t5-xl-summary-map-reduce-1024 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf pszemraj/flan-t5-xl-summary-map-reduce-1024:Q5_0 # Run inference directly in the terminal: llama cli -hf pszemraj/flan-t5-xl-summary-map-reduce-1024:Q5_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf pszemraj/flan-t5-xl-summary-map-reduce-1024:Q5_0 # Run inference directly in the terminal: llama cli -hf pszemraj/flan-t5-xl-summary-map-reduce-1024:Q5_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf pszemraj/flan-t5-xl-summary-map-reduce-1024:Q5_0 # Run inference directly in the terminal: ./llama-cli -hf pszemraj/flan-t5-xl-summary-map-reduce-1024:Q5_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf pszemraj/flan-t5-xl-summary-map-reduce-1024:Q5_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf pszemraj/flan-t5-xl-summary-map-reduce-1024:Q5_0
Use Docker
docker model run hf.co/pszemraj/flan-t5-xl-summary-map-reduce-1024:Q5_0
- LM Studio
- Jan
- vLLM
How to use pszemraj/flan-t5-xl-summary-map-reduce-1024 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pszemraj/flan-t5-xl-summary-map-reduce-1024" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pszemraj/flan-t5-xl-summary-map-reduce-1024", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/pszemraj/flan-t5-xl-summary-map-reduce-1024:Q5_0
- SGLang
How to use pszemraj/flan-t5-xl-summary-map-reduce-1024 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 "pszemraj/flan-t5-xl-summary-map-reduce-1024" \ --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": "pszemraj/flan-t5-xl-summary-map-reduce-1024", "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 "pszemraj/flan-t5-xl-summary-map-reduce-1024" \ --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": "pszemraj/flan-t5-xl-summary-map-reduce-1024", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use pszemraj/flan-t5-xl-summary-map-reduce-1024 with Ollama:
ollama run hf.co/pszemraj/flan-t5-xl-summary-map-reduce-1024:Q5_0
- Unsloth Desktop
- Docker Model Runner
How to use pszemraj/flan-t5-xl-summary-map-reduce-1024 with Docker Model Runner:
docker model run hf.co/pszemraj/flan-t5-xl-summary-map-reduce-1024:Q5_0
- Lemonade
How to use pszemraj/flan-t5-xl-summary-map-reduce-1024 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull pszemraj/flan-t5-xl-summary-map-reduce-1024:Q5_0
Run and chat with the model
lemonade run user.flan-t5-xl-summary-map-reduce-1024-Q5_0
List all available models
lemonade list
- Atomic Chat
YAML Metadata Warning:The pipeline tag "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
flan-t5-xl-summary-map-reduce-1024
A larger t2t model trained to complete the "reduce" step (consolidation step) of map-reduce summarization.
About
Refer to this wiki page or the smaller BART model card for explanations and usage examples.
Comparatively, this model seems to
- produce more eloquent final reduced summaries
- more "gullible"/sensitive to noise in the input summaries
- i.e. a hallucinated one-off term/name/entity is likely to be mentioned/appear in the reduced summary
- agnostic to whitespace in input (by definition, since the t5 tokenizer normalizes whitespace)
Therefore, it's recommended to compare sample outputs of this model and the BART version on your data to see which is better for your use case.
Details
This model is a fine-tuned version of google/flan-t5-xl on the pszemraj/summary-map-reduce-v1 dataset at 1024 context length in/out.
It achieves the following results on the evaluation set:
- Loss: 0.6039
- Num Input Tokens Seen: 7138765
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 8e-05
- train_batch_size: 2
- eval_batch_size: 2
- seed: 17868
- gradient_accumulation_steps: 32
- total_train_batch_size: 64
- optimizer: Use OptimizerNames.PAGED_ADAMW with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.05
- num_epochs: 2.0
- Downloads last month
- 69
Model tree for pszemraj/flan-t5-xl-summary-map-reduce-1024
Base model
google/flan-t5-xl