Instructions to use csala/ALIA-40b-Q3_K-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use csala/ALIA-40b-Q3_K-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="csala/ALIA-40b-Q3_K-GGUF")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("csala/ALIA-40b-Q3_K-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use csala/ALIA-40b-Q3_K-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf csala/ALIA-40b-Q3_K-GGUF # Run inference directly in the terminal: llama cli -hf csala/ALIA-40b-Q3_K-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf csala/ALIA-40b-Q3_K-GGUF # Run inference directly in the terminal: llama cli -hf csala/ALIA-40b-Q3_K-GGUF
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 csala/ALIA-40b-Q3_K-GGUF # Run inference directly in the terminal: ./llama-cli -hf csala/ALIA-40b-Q3_K-GGUF
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 csala/ALIA-40b-Q3_K-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf csala/ALIA-40b-Q3_K-GGUF
Use Docker
docker model run hf.co/csala/ALIA-40b-Q3_K-GGUF
- LM Studio
- Jan
- vLLM
How to use csala/ALIA-40b-Q3_K-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "csala/ALIA-40b-Q3_K-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "csala/ALIA-40b-Q3_K-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/csala/ALIA-40b-Q3_K-GGUF
- SGLang
How to use csala/ALIA-40b-Q3_K-GGUF 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 "csala/ALIA-40b-Q3_K-GGUF" \ --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": "csala/ALIA-40b-Q3_K-GGUF", "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 "csala/ALIA-40b-Q3_K-GGUF" \ --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": "csala/ALIA-40b-Q3_K-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use csala/ALIA-40b-Q3_K-GGUF with Ollama:
ollama run hf.co/csala/ALIA-40b-Q3_K-GGUF
- Unsloth Studio
How to use csala/ALIA-40b-Q3_K-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 csala/ALIA-40b-Q3_K-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 csala/ALIA-40b-Q3_K-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for csala/ALIA-40b-Q3_K-GGUF to start chatting
- Docker Model Runner
How to use csala/ALIA-40b-Q3_K-GGUF with Docker Model Runner:
docker model run hf.co/csala/ALIA-40b-Q3_K-GGUF
- Lemonade
How to use csala/ALIA-40b-Q3_K-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull csala/ALIA-40b-Q3_K-GGUF
Run and chat with the model
lemonade run user.ALIA-40b-Q3_K-GGUF-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- ALIA-40b.Q3_K.gguf +3 -0
- Modelfile +1 -0
- README.md +87 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
ALIA-40b.Q3_K.gguf filter=lfs diff=lfs merge=lfs -text
|
ALIA-40b.Q3_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7b2f5108993242ea821ac451467320ca4db79c03978929873e1dc77ed2947046
|
| 3 |
+
size 20044785408
|
Modelfile
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
FROM ./ALIA-40B.Q3_K.gguf
|
README.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+

|
| 2 |
+
|
| 3 |
+
# ALIA-40b in GGUF format and quantized to `Q3_K`
|
| 4 |
+
|
| 5 |
+
ALIA-40B is a 40B parameter base language model developed by the Barcelona Supercomputing Center (BSC).
|
| 6 |
+
|
| 7 |
+
Original model and details here: https://huggingface.co/BSC-LT/ALIA-40b
|
| 8 |
+
|
| 9 |
+
This model is released under a permissive [Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0).
|
| 10 |
+
Along with the open weights, all training scripts and configuration files are made publicly available in [this GitHub repository](https://github.com/langtech-bsc/alia).
|
| 11 |
+
|
| 12 |
+
This repository contains the model in GGUF format and afterwards quantized to `Q3_K` level using `llama.cpp`.
|
| 13 |
+
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
## Model Details
|
| 17 |
+
|
| 18 |
+
### Description
|
| 19 |
+
|
| 20 |
+
Transformer-based decoder-only language model that has been pre-trained from scratch on 9.37 trillion tokens of highly curated data.
|
| 21 |
+
The pre-training corpus contains text in 35 European languages and code.
|
| 22 |
+
|
| 23 |
+
### Hyperparameters
|
| 24 |
+
|
| 25 |
+
The full list of hyperparameters can be found [here](https://github.com/langtech-bsc/alia/blob/main/configs).
|
| 26 |
+
|
| 27 |
+
### Architecture
|
| 28 |
+
|
| 29 |
+
| | |
|
| 30 |
+
|-------------------------|:--------------|
|
| 31 |
+
| Total Parameters | 40,433,885,184|
|
| 32 |
+
| Embedding Parameters | 2,097,152,000 |
|
| 33 |
+
| Layers | 48 |
|
| 34 |
+
| Hidden size | 8,192 |
|
| 35 |
+
| Attention heads | 64 |
|
| 36 |
+
| Context length | 32,768 |
|
| 37 |
+
| Vocabulary size | 256,000 |
|
| 38 |
+
| Precision | bfloat16 |
|
| 39 |
+
| Embedding type | RoPE |
|
| 40 |
+
| Activation Function | SwiGLU |
|
| 41 |
+
| Layer normalization | RMS Norm |
|
| 42 |
+
| Flash attention | ✅ |
|
| 43 |
+
| Grouped Query Attention | ✅ |
|
| 44 |
+
| Num. query groups | 8 |
|
| 45 |
+
|
| 46 |
+
---
|
| 47 |
+
|
| 48 |
+
## Conversion Process
|
| 49 |
+
|
| 50 |
+
There are the steps that were followed to convert the weights to GGUF format and quantize.
|
| 51 |
+
|
| 52 |
+
### 1. Download from HuggingFace
|
| 53 |
+
|
| 54 |
+
Requirement: [huggingface_hub](https://pypi.org/project/huggingface-hub/)
|
| 55 |
+
|
| 56 |
+
```bash
|
| 57 |
+
huggingface-cli download --cache-dir . BSC-LT/ALIA-40b
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
This command downloads the model into the directory `./models--BSC-LT--ALIA-40b/`
|
| 61 |
+
|
| 62 |
+
The safetensors files end up inside `./models--BSC-LT--ALIA-40b/snapshots/aa8a4ac7f9e18f3c2ea8ec0cc84e7783cd751ac7/`.
|
| 63 |
+
|
| 64 |
+
## 2. Convert Safetensors to GUFF without quantization using llama.cpp
|
| 65 |
+
|
| 66 |
+
Requirement: [llama.cpp](https://github.com/ggml-org/llama.cpp) repository and python requirements installed.
|
| 67 |
+
|
| 68 |
+
```bash
|
| 69 |
+
cd $LLAMA_PATH
|
| 70 |
+
python convert_hf_to_gguf.py $ALIA_PATH/models--BSC-LT--ALIA-40b/snapshots/aa8a4ac7f9e18f3c2ea8ec0cc84e7783cd751ac7/ --outfile $ALIA_PATH/ALIA-40B.gguf
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
`LLAMA_PATH` is the root of the llama.cpp directory.
|
| 74 |
+
`ALIA_PATH` is the directory where we downloaded the Safetensors weights and where we want to store the ALIA-40B GGUF file.
|
| 75 |
+
|
| 76 |
+
This creates the file `$ALIA_PATH/ALIA-40B.gguf`.
|
| 77 |
+
|
| 78 |
+
## 3. Quantize the model
|
| 79 |
+
|
| 80 |
+
Requirement: [llama.cpp](https://github.com/ggml-org/llama.cpp) built and installed.
|
| 81 |
+
|
| 82 |
+
```bash
|
| 83 |
+
cd $ALIA_PATH
|
| 84 |
+
llama-quantize ALIA-40B.gguf ALIA-40B.Q3_K.gguf Q3_K
|
| 85 |
+
```
|
| 86 |
+
|
| 87 |
+
This generates the file `ALIA-40B.Q3_K.gguf` within the same directory.
|