Text Generation
Transformers
PyTorch
TensorBoard
Japanese
gpt2
japanese
lm
nlp
text-generation-inference
Instructions to use huranokuma/es_IT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huranokuma/es_IT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="huranokuma/es_IT")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("huranokuma/es_IT") model = AutoModelForCausalLM.from_pretrained("huranokuma/es_IT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use huranokuma/es_IT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "huranokuma/es_IT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "huranokuma/es_IT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/huranokuma/es_IT
- SGLang
How to use huranokuma/es_IT 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 "huranokuma/es_IT" \ --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": "huranokuma/es_IT", "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 "huranokuma/es_IT" \ --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": "huranokuma/es_IT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use huranokuma/es_IT with Docker Model Runner:
docker model run hf.co/huranokuma/es_IT
| { | |
| "additional_special_tokens": [], | |
| "bos_token": "<s>", | |
| "cls_token": "[CLS]", | |
| "do_lower_case": true, | |
| "eos_token": "</s>", | |
| "extra_ids": 0, | |
| "mask_token": "[MASK]", | |
| "name_or_path": "huranokuma/es2", | |
| "pad_token": "[PAD]", | |
| "sep_token": "[SEP]", | |
| "sp_model_kwargs": {}, | |
| "special_tokens_map_file": "/root/.cache/huggingface/hub/models--rinna--japanese-gpt2-medium/snapshots/f464b76739c884d8b0479a0a7705b7fa71c3fd5a/special_tokens_map.json", | |
| "tokenizer_class": "T5Tokenizer", | |
| "unk_token": "<unk>" | |
| } | |