How to use from
vLLM
Install from pip and serve model
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "ruhook/test-ruhook"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
	-H "Content-Type: application/json" \
	--data '{
		"model": "ruhook/test-ruhook",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
Use Docker
docker model run hf.co/ruhook/test-ruhook
Quick Links

Tiny random GPT-2 for testing

This model is randomly initialized and has not been trained. It is for testing upload, download, tokenization, and model loading only. Its output is not meaningful and it is not suitable for real language tasks or benchmarking. No pretrained model weights or training datasets were used.

Architecture: 1 GPT-2 layer, 1 attention head, 16 hidden dimensions, 32 vocabulary tokens, and a maximum context length of 64 tokens. Parameter count: 3792.

Usage

from transformers import AutoTokenizer, AutoModelForCausalLM

repo = "ruhook/test-ruhook"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo)
inputs = tokenizer("hello world", return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=5, do_sample=False)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Validated locally with Python 3, torch 2.2.2 and transformers 4.46.3. The toy word-level tokenizer maps words outside its small vocabulary to UNK.

Downloads last month
1,225
Safetensors
Model size
3.79k params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support