Instructions to use harpertoken/word with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use harpertoken/word with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="harpertoken/word")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("harpertoken/word") model = AutoModelForCausalLM.from_pretrained("harpertoken/word", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use harpertoken/word with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "harpertoken/word" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "harpertoken/word", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/harpertoken/word
- SGLang
How to use harpertoken/word 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 "harpertoken/word" \ --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": "harpertoken/word", "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 "harpertoken/word" \ --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": "harpertoken/word", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use harpertoken/word with Docker Model Runner:
docker model run hf.co/harpertoken/word
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -11,7 +11,7 @@ tags:
|
|
| 11 |
|
| 12 |
# word
|
| 13 |
|
| 14 |
-
A GPT-2 language model trained from random initialisation on WikiText-2, rather than adapted from OpenAI's released weights. The architecture is GPT-2 small — twelve layers, 768 embedding dimensions, 50257-token vocabulary — which works out at about 124M parameters; the previous version of this card put the figure at 117M, which does not match the 496 MB float32 checkpoint. `config.json` carries no `_name_or_path`, confirming nothing was fine-tuned.
|
| 15 |
|
| 16 |
The tokenizer is GPT-2's own byte-pair vocabulary, taken from [`openai-community/gpt2`](https://huggingface.co/openai-community/gpt2), because the checkpoint was trained from scratch and therefore ships no vocabulary of its own. It matches: both are 50257 entries, so the token ids in the weights line up with this tokenizer exactly. An earlier version of this repository shipped no tokenizer at all, and `AutoTokenizer` then returned an empty vocabulary of length one rather than raising, which meant every input collapsed to the unknown token and generation returned noise without any error. That is fixed. GPT-2 uses byte-pair encoding without a distinct unknown token, so rare inputs are segmented rather than discarded — one reason a model of this size produces fluent-looking nonsense.
|
| 17 |
|
|
|
|
| 11 |
|
| 12 |
# word
|
| 13 |
|
| 14 |
+
A GPT-2 language model trained from random initialisation on WikiText-2, rather than adapted from OpenAI's released weights. The architecture is GPT-2 small — twelve layers, 768 embedding dimensions, 50257-token vocabulary — which works out at about 124M parameters; the previous version of this card put the figure at 117M, which does not match the 496 MB float32 checkpoint. `config.json` carries no `_name_or_path`, confirming nothing was fine-tuned. One structural difference from stock GPT-2 is worth knowing: `n_positions` is 512 rather than 1024, and the position embedding really is 512 rows, so this model accepts half the context a standard GPT-2 does.
|
| 15 |
|
| 16 |
The tokenizer is GPT-2's own byte-pair vocabulary, taken from [`openai-community/gpt2`](https://huggingface.co/openai-community/gpt2), because the checkpoint was trained from scratch and therefore ships no vocabulary of its own. It matches: both are 50257 entries, so the token ids in the weights line up with this tokenizer exactly. An earlier version of this repository shipped no tokenizer at all, and `AutoTokenizer` then returned an empty vocabulary of length one rather than raising, which meant every input collapsed to the unknown token and generation returned noise without any error. That is fixed. GPT-2 uses byte-pair encoding without a distinct unknown token, so rare inputs are segmented rather than discarded — one reason a model of this size produces fluent-looking nonsense.
|
| 17 |
|