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

tiny-lm

This repository provides a tiny 16M parameters language model for debugging and testing purposes.

Trained on English and Japanese Wikipedia data.

How to use

from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
 
model = AutoModelForCausalLM.from_pretrained("sbintuitions/tiny-lm", torch_dtype="auto")
tokenizer = AutoTokenizer.from_pretrained("sbintuitions/tiny-lm", use_fast=False)
generator = pipeline("text-generation", model=model, tokenizer=tokenizer)
print(generator("Hello", max_length=30, do_sample=True, top_k=100))

Model architecture

A 4-layer, 512-hidden-size transformer-based language model.

Training

The model was trained on English Wikipedia and Japanese Wikipedia to optimize a traditional language modelling objective for 25B tokens.

License

MIT License

Downloads last month
2,696
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for sbintuitions/tiny-lm

Finetunes
1 model

Dataset used to train sbintuitions/tiny-lm

Space using sbintuitions/tiny-lm 1