Text Generation
Transformers
Safetensors
English
bard
feature-extraction
interactive-fiction
text-adventure
storytelling
custom_code
Instructions to use lowerkey/bard-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lowerkey/bard-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lowerkey/bard-small", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("lowerkey/bard-small", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lowerkey/bard-small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lowerkey/bard-small" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lowerkey/bard-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lowerkey/bard-small
- SGLang
How to use lowerkey/bard-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 "lowerkey/bard-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": "lowerkey/bard-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 "lowerkey/bard-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": "lowerkey/bard-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use lowerkey/bard-small with Docker Model Runner:
docker model run hf.co/lowerkey/bard-small
Add benchmarks
Browse files
README.md
CHANGED
|
@@ -156,6 +156,22 @@ stories, Project Gutenberg fiction, WritingPrompts and BookCorpus, with some Fin
|
|
| 156 |
how to write normal sentences. Last, choose-your-own-adventure stories converted into the block format above, which is
|
| 157 |
where it learns to write narration, changes and choices in that shape.
|
| 158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
## What it's bad at
|
| 160 |
|
| 161 |
Plenty. It's small. Names and details change between turns, the plot wanders off, and now and then a turn makes no
|
|
|
|
| 156 |
how to write normal sentences. Last, choose-your-own-adventure stories converted into the block format above, which is
|
| 157 |
where it learns to write narration, changes and choices in that shape.
|
| 158 |
|
| 159 |
+
## Benchmarks
|
| 160 |
+
|
| 161 |
+
Zero-shot, scored the way EleutherAI's lm-evaluation-harness does it, on the full test sets. I only ran the ones that
|
| 162 |
+
say something about writing: everyday plausibility and long-range context. Science and math questions don't tell you
|
| 163 |
+
much about a storyteller. GPT-2 small (124M) is the closest well-known model, so it's the reference.
|
| 164 |
+
|
| 165 |
+
| | Bard Small | GPT-2 124M | Chance |
|
| 166 |
+
|---|---|---|---|
|
| 167 |
+
| HellaSwag (which ending fits the scene) | 33.7% | 31.1% | 25% |
|
| 168 |
+
| LAMBADA (guess a passage's last word) | 46.3% | 32.6% | |
|
| 169 |
+
| PIQA (physical common sense) | 60.1% | 62.5% | 50% |
|
| 170 |
+
| Winogrande (who does "it" mean) | 51.6% | 51.6% | 50% |
|
| 171 |
+
|
| 172 |
+
LAMBADA is made of book text, and BookCorpus is in the training data, so treat that number with care. Winogrande is
|
| 173 |
+
at chance, as it is for most models this size. The GPT-2 figures are approximate, taken from published reports.
|
| 174 |
+
|
| 175 |
## What it's bad at
|
| 176 |
|
| 177 |
Plenty. It's small. Names and details change between turns, the plot wanders off, and now and then a turn makes no
|