Instructions to use openGPT-X/Teuken-7B-instruct-research-v0.4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openGPT-X/Teuken-7B-instruct-research-v0.4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openGPT-X/Teuken-7B-instruct-research-v0.4")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("openGPT-X/Teuken-7B-instruct-research-v0.4") model = AutoModelForMultimodalLM.from_pretrained("openGPT-X/Teuken-7B-instruct-research-v0.4") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use openGPT-X/Teuken-7B-instruct-research-v0.4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openGPT-X/Teuken-7B-instruct-research-v0.4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openGPT-X/Teuken-7B-instruct-research-v0.4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/openGPT-X/Teuken-7B-instruct-research-v0.4
- SGLang
How to use openGPT-X/Teuken-7B-instruct-research-v0.4 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 "openGPT-X/Teuken-7B-instruct-research-v0.4" \ --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": "openGPT-X/Teuken-7B-instruct-research-v0.4", "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 "openGPT-X/Teuken-7B-instruct-research-v0.4" \ --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": "openGPT-X/Teuken-7B-instruct-research-v0.4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use openGPT-X/Teuken-7B-instruct-research-v0.4 with Docker Model Runner:
docker model run hf.co/openGPT-X/Teuken-7B-instruct-research-v0.4
Are you considering to add more European languages ?
Hi,
very delighted to see these efforts for European languages !
I am asking myself if you would consider adding more European languages to the mix, like Norwegian, Icelandic, etc. ? I am aware that one could fine-tune the model for those languages, but having them already inside per-se would be a great foundation for the whole European ecosystem.
What would be needed to add those languages to the "next" version of the model ? Is the tokenizer already able to tokenize these languages ? Especially Icelandic has those unusual letters like "æ", "ð", "þ", etc.
Yes! So next to Fraunhofer IAIS many partners of the consortium like FZ Jülich are also working in the TrustLLM project that focuses on germanic languages (https://trustllm.eu) including Icelandic. Plus, Eurolingua will include more european languages (https://www.handelsblatt.com/technik/ki/ki-forschung-forscher-gewinnen-88-millionen-ki-trainingsstunden/100037506.html). Regarding the tokenizer you can refer to the OpenGPT-X publication (https://aclanthology.org/2024.findings-naacl.247/)
Thank you for providing these valuable insights! I found the link to the research paper particularly interesting. I assume that for Eurolingua, you are including all European languages, including Icelandic, in your training. The Handelsblatt article mentioned that you are building your text corpora based on web crawling. If this is not a mandatory criterion, you might consider using additionally the material available at https://github.com/icelandic-lt/, also available via https://clarin.is for the Icelandic portion.