Instructions to use africatic/atic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use africatic/atic with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-4-E4B-it") model = PeftModel.from_pretrained(base_model, "africatic/atic") - Transformers
How to use africatic/atic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="africatic/atic") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("africatic/atic", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use africatic/atic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "africatic/atic" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "africatic/atic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/africatic/atic
- SGLang
How to use africatic/atic 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 "africatic/atic" \ --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": "africatic/atic", "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 "africatic/atic" \ --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": "africatic/atic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use africatic/atic with Docker Model Runner:
docker model run hf.co/africatic/atic
| base_model: google/gemma-4-E4B-it | |
| library_name: peft | |
| pipeline_tag: text-generation | |
| license: apache-2.0 | |
| datasets: | |
| - africatic/afritemp-bench | |
| tags: | |
| - base_model:adapter:google/gemma-4-E4B-it | |
| - lora | |
| - sft | |
| - transformers | |
| - trl | |
| # Gemma 4 E4B — AfriTemp LoRA | |
| This repository contains a LoRA adapter fine-tuned from | |
| [`google/gemma-4-E4B-it`](https://huggingface.co/google/gemma-4-E4B-it) on | |
| [`africatic/afritemp-bench`](https://huggingface.co/datasets/africatic/afritemp-bench). | |
| ## Training setup | |
| - Method: LoRA supervised fine-tuning | |
| - Precision: BF16 | |
| - GPU: NVIDIA A100-SXM4-40GB | |
| - Maximum sequence length: 1024 | |
| - Epochs: 3 | |
| - Per-device batch size: 1 | |
| - Gradient accumulation: 16 | |
| - Effective batch size: 16 | |
| - Learning rate: 0.0002 | |
| - LoRA rank: 16 | |
| - LoRA alpha: 32 | |
| ## Intended use | |
| The adapter is intended for research on temporal reasoning and African | |
| economic, social and development data. It should be evaluated carefully before | |
| use in consequential decision-making. | |
| ## Loading | |
| ```python | |
| import torch | |
| from peft import PeftModel | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| base_model_id = "google/gemma-4-E4B-it" | |
| adapter_id = "YOUR_HF_USERNAME/gemma-4-e4b-afritemp" | |
| tokenizer = AutoTokenizer.from_pretrained(adapter_id) | |
| base_model = AutoModelForCausalLM.from_pretrained( | |
| base_model_id, | |
| dtype=torch.bfloat16, | |
| device_map="auto", | |
| ) | |
| model = PeftModel.from_pretrained(base_model, adapter_id) | |
| ``` | |
| ### Framework versions | |
| - PEFT 0.19.1 |