Instructions to use QuantFactory/lola_v1-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantFactory/lola_v1-GGUF with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("QuantFactory/lola_v1-GGUF", dtype="auto") - llama-cpp-python
How to use QuantFactory/lola_v1-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/lola_v1-GGUF", filename="lola_v1.Q2_K.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use QuantFactory/lola_v1-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/lola_v1-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/lola_v1-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/lola_v1-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/lola_v1-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf QuantFactory/lola_v1-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/lola_v1-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf QuantFactory/lola_v1-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/lola_v1-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/lola_v1-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use QuantFactory/lola_v1-GGUF with Ollama:
ollama run hf.co/QuantFactory/lola_v1-GGUF:Q4_K_M
- Unsloth Studio new
How to use QuantFactory/lola_v1-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QuantFactory/lola_v1-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QuantFactory/lola_v1-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/lola_v1-GGUF to start chatting
- Docker Model Runner
How to use QuantFactory/lola_v1-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/lola_v1-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/lola_v1-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/lola_v1-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.lola_v1-GGUF-Q4_K_M
List all available models
lemonade list
llm.create_chat_completion(
messages = "No input example has been defined for this model task."
)QuantFactory/lola_v1-GGUF
This is quantized version of dice-research/lola_v1 created using llama.cpp
Original Model Card
LOLA — An Open-Source Massively Multilingual Large Language Model
Abstract
LOLA is a massively multilingual large language model trained on more than 160 languages using a sparse Mixture-of-Experts Transformer architecture. Our architectural and implementation choices address the challenge of harnessing linguistic diversity while maintaining efficiency and avoiding the common pitfalls of multilinguality. Our analysis of the evaluation results shows competitive performance in natural language generation and understanding tasks. Additionally, we demonstrate how the learned expert-routing mechanism exploits implicit phylogenetic linguistic patterns to potentially alleviate the curse of multilinguality. We provide an in-depth look at the training process, an analysis of the datasets, and a balanced exploration of the model's strengths and limitations. As an open-source model, LOLA promotes reproducibility and serves as a robust foundation for future research. Our findings enable the development of compute-efficient multilingual models with strong, scalable performance across languages.
Paper: https://arxiv.org/abs/2409.11272
Model Description
- Developed by: DICE Research Group (https://dice-research.org/) @ Paderborn University (https://www.uni-paderborn.de/)
- Model type: GPT2 style (decoder-only) with alternating sparse Mixture-of-Experts layers
- Number of Experts: 16
- Model Size: 1.3 Billion (active*) / 7.4 Billion (total)
- Language(s) (NLP): 160+
- License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
- Repository: https://github.com/dice-group/LOLA
* The number of parameters a model utilizes per token (ref: Fedus et al, 2022; Du et al, 2022). This distinction is crucial for understanding the efficiency and performance of MoE models.
How to Get Started with the Model
This pre-trained (causal language modeling) model can only be used for text-generation and requires further fine-tuning on downstream tasks.
How to use
You can use this model directly with a pipeline for text generation.
>>> from transformers import pipeline
>>> generator = pipeline('text-generation', model="dice-research/lola_v1", trust_remote_code=True)
>>> generator("The quick brown fox", max_length=13)
[{'generated_text': 'The quick brown fox jumps over the lazy dog.'}]
To use the top-k sampling, please set do_sample to True.
Note: The tokenizer used in the model comes from mGPT (https://github.com/ai-forever/mgpt)
Training Details
Training Framework
- DeepSpeed Megatron (https://github.com/microsoft/Megatron-DeepSpeed)
- Architecture type: Transformers (Decoder-only) with Mixture-of-Experts (MoE)
- Number of Experts: 16
- Model Size: 1.3 Billion Dense / 7.4 Billion Sparse
Pretraining Dataset
- CulturaX (https://huggingface.co/datasets/uonlp/CulturaX)
- Total Tokens: 6.3 Trillion
- Total Languages: 167
LOLA v1 Training:
- Computing cluster: Noctua2 (https://pc2.uni-paderborn.de/hpc-services/available-systems/noctua2)
- Number of GPUs: 96x Nvidia A100 (40GB)
- Training steps: 296000
- Tokens consumed: 465 Billion
- Training time: ~19 days
Citation
If you use our work in your research, please make sure to cite it:
@misc{srivastava2024lolaopensourcemassively,
title={LOLA -- An Open-Source Massively Multilingual Large Language Model},
author={Nikit Srivastava and Denis Kuchelev and Tatiana Moteu Ngoli and Kshitij Shetty and Michael Roeder and Diego Moussallem and Hamada Zahera and Axel-Cyrille Ngonga Ngomo},
year={2024},
eprint={2409.11272},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2409.11272},
}
- Downloads last month
- 244
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/lola_v1-GGUF", filename="", )