Instructions to use HiTZ/gpt2-eus-euscrawl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HiTZ/gpt2-eus-euscrawl with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HiTZ/gpt2-eus-euscrawl")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HiTZ/gpt2-eus-euscrawl") model = AutoModelForCausalLM.from_pretrained("HiTZ/gpt2-eus-euscrawl", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HiTZ/gpt2-eus-euscrawl with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HiTZ/gpt2-eus-euscrawl" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HiTZ/gpt2-eus-euscrawl", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HiTZ/gpt2-eus-euscrawl
- SGLang
How to use HiTZ/gpt2-eus-euscrawl 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 "HiTZ/gpt2-eus-euscrawl" \ --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": "HiTZ/gpt2-eus-euscrawl", "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 "HiTZ/gpt2-eus-euscrawl" \ --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": "HiTZ/gpt2-eus-euscrawl", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use HiTZ/gpt2-eus-euscrawl with Docker Model Runner:
docker model run hf.co/HiTZ/gpt2-eus-euscrawl
Commit History
-
Adding `safetensors` variant of this model
This is an automated PR created with https://huggingface.co/spaces/safetensors/convert This new file is equivalent to `pytorch_model.bin` but safe in the sense that no arbitrary code can be put into it. These files also happen to load much faster than their pytorch counterpart: https://colab.research.google.com/github/huggingface/notebooks/blob/main/safetensors_doc/en/speed.ipynb The widgets on your model page will run using this model even if this is not merged making sure the file actually works. If you find any issues: please report here: https://huggingface.co/spaces/safetensors/convert/discussions Feel free to ignore this PR.0e6406f
-
Training in progress, step 252000
948a159 -
Training in progress, step 250500
395f492 -
Training in progress, step 250000
1e6989a -
Training in progress, step 249500
5550981 -
Training in progress, step 248500
f309342 -
Training in progress, step 247500
b74880d -
Training in progress, step 246500
a2167ed
-
Training in progress, step 245500
8ff1ece
-
Training in progress, step 244500
b727ec2 -
Training in progress, step 244000
0fc82aa -
Training in progress, step 243500
2a25441 -
Training in progress, step 243000
5681c97 -
Training in progress, step 242500
ef9890a -
Training in progress, step 242000
65d58df -
Training in progress, step 241500
b90f22c -
Training in progress, step 241000
af8fe7a -
Training in progress, step 240500
34f86d4 -
Training in progress, step 240000
4bc9359 -
Training in progress, step 239500
7bc15b4 -
Training in progress, step 239000
b561c88 -
Training in progress, step 238500
450de84 -
Training in progress, step 238000
9ed78e6 -
Training in progress, step 237500
50883aa -
Training in progress, step 237000
e95cf30 -
Training in progress, step 236500
900e973 -
Training in progress, step 236000
2981993 -
Training in progress, step 235500
097c1fa -
Training in progress, step 235000
3ad3bca -
Training in progress, step 234500
cabf8ab -
Training in progress, step 234000
fb13d08 -
Training in progress, step 233500
0bf3627 -
Training in progress, step 233000
658eef2 -
Training in progress, step 232500
cca4413
-
Training in progress, step 232000
4653514 -
Training in progress, step 231500
c0a2ea3 -
Training in progress, step 231000
2f90c36 -
Training in progress, step 230500
b0cff2b -
Training in progress, step 230000
742645c -
Training in progress, step 229500
3e4ec74 -
Training in progress, step 229000
0d3f4d3 -
Training in progress, step 228500
19a66f9 -
Training in progress, step 228000
a8ae85f -
Training in progress, step 227500
85af1af -
Training in progress, step 227000
2910efe -
Training in progress, step 226500
900ec95 -
Training in progress, step 226000
65b4ce8 -
Training in progress, step 225500
5172fae -
Training in progress, step 225000
c3e69cc -
Training in progress, step 224500
b984dd9