Instructions to use TurkuNLP/gpt3-finnish-13B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TurkuNLP/gpt3-finnish-13B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TurkuNLP/gpt3-finnish-13B")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("TurkuNLP/gpt3-finnish-13B") model = AutoModel.from_pretrained("TurkuNLP/gpt3-finnish-13B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TurkuNLP/gpt3-finnish-13B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TurkuNLP/gpt3-finnish-13B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TurkuNLP/gpt3-finnish-13B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TurkuNLP/gpt3-finnish-13B
- SGLang
How to use TurkuNLP/gpt3-finnish-13B 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 "TurkuNLP/gpt3-finnish-13B" \ --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": "TurkuNLP/gpt3-finnish-13B", "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 "TurkuNLP/gpt3-finnish-13B" \ --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": "TurkuNLP/gpt3-finnish-13B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TurkuNLP/gpt3-finnish-13B with Docker Model Runner:
docker model run hf.co/TurkuNLP/gpt3-finnish-13B
KeyError bloom? PredictionException 'bloom'?
Tried to deploy this model to amazon aws sagemaker. I got endpoint done but when doing inference getting KeyError 'bloom'.
Log showed one line:
mms.service.PredictionException: 'bloom'
I wonder if this is my fault or some sort of actual ModelError?
I'm afraid we haven't tried this on sagemaker. The model is internally a BloomModel, so perhaps this might related to BLOOM support? Can you run the original BLOOM models?
I'll give it a go. This might be related to config file missing piece of information. Or it might be huggingface version issue (sagemaker uses transformers_version="4.17")
No luck with BloomModels. I'm fairly certain the problem relates to transformers version.
Here's a good & detailed article on potential solution (have not tried yet) in case somebody else has the same issue: