Instructions to use kaizuberbuehler/Alpesteibock-Llama-3-8B-Alpha with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kaizuberbuehler/Alpesteibock-Llama-3-8B-Alpha with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kaizuberbuehler/Alpesteibock-Llama-3-8B-Alpha") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("kaizuberbuehler/Alpesteibock-Llama-3-8B-Alpha") model = AutoModelForMultimodalLM.from_pretrained("kaizuberbuehler/Alpesteibock-Llama-3-8B-Alpha") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use kaizuberbuehler/Alpesteibock-Llama-3-8B-Alpha with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kaizuberbuehler/Alpesteibock-Llama-3-8B-Alpha" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kaizuberbuehler/Alpesteibock-Llama-3-8B-Alpha", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kaizuberbuehler/Alpesteibock-Llama-3-8B-Alpha
- SGLang
How to use kaizuberbuehler/Alpesteibock-Llama-3-8B-Alpha 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 "kaizuberbuehler/Alpesteibock-Llama-3-8B-Alpha" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kaizuberbuehler/Alpesteibock-Llama-3-8B-Alpha", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "kaizuberbuehler/Alpesteibock-Llama-3-8B-Alpha" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kaizuberbuehler/Alpesteibock-Llama-3-8B-Alpha", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use kaizuberbuehler/Alpesteibock-Llama-3-8B-Alpha with Docker Model Runner:
docker model run hf.co/kaizuberbuehler/Alpesteibock-Llama-3-8B-Alpha
Alpesteibock-Llama-3-8B-Alpha
Alpesteibock-Llama-3-8B-Alpha is an experimental QLoRA fine-tune of NousResearch/Hermes-2-Pro-Llama-3-8B on a dataset of 34.7 million tokens of Swiss German text from multiple sources for two epochs.
License
This model is released under the Llama 3 Community License.
Usage
The model uses ChatML as an instruction template and was trained using "You are Alpesteibock, a helpful assistant who speaks Swiss German." as a system message:
<|im_start|>system
You are Alpesteibock, a helpful assistant who speaks Swiss German.<|im_end|>
<|im_start|>user
Hoi. Wie heissisch du?<|im_end|>
<|im_start|>assistant
Ich bi de Alpesteibock und ich freu mi uf di.<|im_end|>
Dataset
The dataset used for training consists of the following sources:
| Dataset | File Size | Description | Phase |
|---|---|---|---|
| Glot500 Corpus (gsw_Latn, Leipzig_web) | 21.7 MB | Text, usually sentences, crawled from the web | 1 |
| Alemannic Wikipedia (Subset) | 50.5 MB | Articles in the Alemannic Wikipedia with most of those written in Alsatian filtered out | 2 |
| Schweizerdeutscher Mundartkorpus (Copyright Free Subset) | 28.4 MB | Copyright free books written in Swiss German | 2 |
| GlotCC-V1.0 (gsw-Latn) | 7.5 MB | Document-level general domain monolingual dataset derived from CommonCrawl | 2 |
| Synthetic Instruction Data | 1.7 MB | Different datasets of synthetically generated Swiss German text | 2 |
Training Details
Hardware: 1x RTX 4090
Duration: 40 hours in total (2 hours for first phase and 38 hours for second phase)
Hyperparameters
Adapter: QLoRA
Precision: 4-bit
Optimizer: adamw_bnb_8bit
LoRA Rank: 256
LoRA Alpha: 256
Learning Rate: 1e-5
Scheduler: Cosine
Context Length: 4096
Batch Size: 1
Gradient Accumulation Steps: 1
Sample Packing: On for first phase, Off for second phase
Epochs: 2
- Downloads last month
- 9