Instructions to use LeoLM/leo-hessianai-70b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LeoLM/leo-hessianai-70b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LeoLM/leo-hessianai-70b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LeoLM/leo-hessianai-70b") model = AutoModelForCausalLM.from_pretrained("LeoLM/leo-hessianai-70b") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use LeoLM/leo-hessianai-70b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LeoLM/leo-hessianai-70b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LeoLM/leo-hessianai-70b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LeoLM/leo-hessianai-70b
- SGLang
How to use LeoLM/leo-hessianai-70b 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 "LeoLM/leo-hessianai-70b" \ --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": "LeoLM/leo-hessianai-70b", "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 "LeoLM/leo-hessianai-70b" \ --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": "LeoLM/leo-hessianai-70b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LeoLM/leo-hessianai-70b with Docker Model Runner:
docker model run hf.co/LeoLM/leo-hessianai-70b
LAION LeoLM 70b: Linguistically Enhanced Open Language Model
Meet LeoLM, the first open and commercially available German Foundation Language Model built on Llama-2.
Our models extend Llama-2's capabilities into German through continued pretraining on a large corpus of German-language and mostly locality specific text.
Thanks to a compute grant at HessianAI's new supercomputer 42, we release a series foundation models trained with 8k context length
under the Llama-2 community license. Now, we're finally releasing the
much anticipated leo-hessianai-70b, the largest model of this series based on Llama-2-70b.
With this release, we hope to bring a new wave of opportunities to German open-source and commercial LLM research and accelerate adoption.
Read our blog post or our paper (preprint coming soon) for more details!
A project by Björn Plüster and Christoph Schuhmann in collaboration with LAION and HessianAI.
Model Details
- Finetuned from: meta-llama/Llama-2-70b-hf
- Model type: Causal decoder-only transformer language model
- Language: English and German
- License: LLAMA 2 COMMUNITY LICENSE AGREEMENT
- Contact: LAION Discord or Björn Plüster
Use in 🤗Transformers
First install direct dependencies:
pip install transformers torch
Then load the model in transformers. Note that this requires lots of VRAM and most-likely multiple devices. Use load_in_8bit=True or load_in_4bit=True
to save some memory by using a quantized version. For more quantized versions, check out our models at TheBloke's page: (coming soon!)
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained(
model="LeoLM/leo-hessianai-70b",
device_map="auto",
torch_dtype=torch.bfloat16,
use_flash_attention_2=False # Set to true to use FA2. Requires `pip install flash-attn`
)
Training parameters
Benchmarks
- Downloads last month
- 19


