Instructions to use plvictor/Alef-Biblical-1.5B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use plvictor/Alef-Biblical-1.5B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="plvictor/Alef-Biblical-1.5B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("plvictor/Alef-Biblical-1.5B-Instruct") model = AutoModelForCausalLM.from_pretrained("plvictor/Alef-Biblical-1.5B-Instruct") 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]:])) - llama-cpp-python
How to use plvictor/Alef-Biblical-1.5B-Instruct with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="plvictor/Alef-Biblical-1.5B-Instruct", filename="gguf/Alef-Biblical-1.5B-Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use plvictor/Alef-Biblical-1.5B-Instruct with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf plvictor/Alef-Biblical-1.5B-Instruct:Q4_K_M # Run inference directly in the terminal: llama-cli -hf plvictor/Alef-Biblical-1.5B-Instruct:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf plvictor/Alef-Biblical-1.5B-Instruct:Q4_K_M # Run inference directly in the terminal: llama-cli -hf plvictor/Alef-Biblical-1.5B-Instruct: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 plvictor/Alef-Biblical-1.5B-Instruct:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf plvictor/Alef-Biblical-1.5B-Instruct: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 plvictor/Alef-Biblical-1.5B-Instruct:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf plvictor/Alef-Biblical-1.5B-Instruct:Q4_K_M
Use Docker
docker model run hf.co/plvictor/Alef-Biblical-1.5B-Instruct:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use plvictor/Alef-Biblical-1.5B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "plvictor/Alef-Biblical-1.5B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "plvictor/Alef-Biblical-1.5B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/plvictor/Alef-Biblical-1.5B-Instruct:Q4_K_M
- SGLang
How to use plvictor/Alef-Biblical-1.5B-Instruct 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 "plvictor/Alef-Biblical-1.5B-Instruct" \ --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": "plvictor/Alef-Biblical-1.5B-Instruct", "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 "plvictor/Alef-Biblical-1.5B-Instruct" \ --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": "plvictor/Alef-Biblical-1.5B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use plvictor/Alef-Biblical-1.5B-Instruct with Ollama:
ollama run hf.co/plvictor/Alef-Biblical-1.5B-Instruct:Q4_K_M
- Unsloth Studio
How to use plvictor/Alef-Biblical-1.5B-Instruct 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 plvictor/Alef-Biblical-1.5B-Instruct 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 plvictor/Alef-Biblical-1.5B-Instruct to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for plvictor/Alef-Biblical-1.5B-Instruct to start chatting
- Docker Model Runner
How to use plvictor/Alef-Biblical-1.5B-Instruct with Docker Model Runner:
docker model run hf.co/plvictor/Alef-Biblical-1.5B-Instruct:Q4_K_M
- Lemonade
How to use plvictor/Alef-Biblical-1.5B-Instruct with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull plvictor/Alef-Biblical-1.5B-Instruct:Q4_K_M
Run and chat with the model
lemonade run user.Alef-Biblical-1.5B-Instruct-Q4_K_M
List all available models
lemonade list
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": "What is the capital of France?"
}
]
)Alef Biblical 1.5B — Instruct
Alef é um assistente conversacional em português especializado em Bíblia, teologia e fé cristã. Fala como gente, não como enciclopédia. Direto, acolhedor, com convicção — e com bom humor na hora certa.
Roda no Mac, no Jetson Nano e em qualquer GPU via GGUF. Veja os arquivos na pasta
gguf/deste repositório.
Por que o Alef existe?
Modelos de IA especializados em Bíblia e teologia quase sempre são em inglês. A comunidade de IA brasileira ainda tem muito espaço pra crescer nesse nicho.
O Alef foi construído por um desenvolvedor solo como experimento de fine-tuning especializado em PT-BR — com dataset curado, CPT denso e SFT conversacional feito do zero. O objetivo não é ser o modelo definitivo do assunto, mas mostrar que dá pra construir isso com recursos limitados, documentar o processo abertamente, e contribuir pra comunidade brasileira de IA evoluir nessa direção.
Se você quer aprender sobre CPT, SFT, GGUF ou fine-tuning de LLMs em português — esse projeto pode ser um bom ponto de partida.
Pipeline
Polygl0t/Tucano2-qwen-1.5B-Base
↓ CPT — 368M tokens bíblicos em PT
plvictor/Alef-Biblical-1.5B-Base
↓ SFT com LoRA — ~82k exemplos conversacionais
plvictor/Alef-Biblical-1.5B-Instruct ← você está aqui
Sobre o modelo
| Campo | Valor |
|---|---|
| Arquitetura | Qwen3 |
| Parâmetros | 1.51B |
| Tipo | Instruction-tuned (chat) |
| Idioma | Português Brasileiro (PT-BR) |
| Domínio | Bíblia, teologia, fé cristã |
| Context length | 4096 tokens |
| Dtype | BFloat16 |
Treino — SFT
Dataset
~82.000 exemplos conversacionais gerados sobre o corpus do app Com Ele, em 24 categorias e 4 personas de usuário (iniciante, crente maduro, em crise, cético), cobrindo:
teologia · vida cristã · dor e crise · dúvida e fé · apologética · personagens bíblicos · exegese AT/NT · história bíblica · família · oração · escatologia · graça e perdão · missões · ética · relacionamentos · e mais.
Configuração
| Parâmetro | Valor |
|---|---|
| Método | LoRA (mergeado no modelo base) |
| Épocas | 3 |
| Steps | 7.080 |
| train_loss final | 1.8405 |
| eval_loss final | 1.8590 |
| Tempo de treino | 6h 24min |
| GPU | NVIDIA H100 NVL (95GB VRAM) |
| Framework | HuggingFace Transformers + PEFT |
| Precisão | BFloat16 |
Arquivos GGUF
Disponíveis na pasta gguf/ deste repositório:
| Arquivo | Tamanho | Ideal para |
|---|---|---|
Alef-Biblical-1.5B-Q4_K_M.gguf |
888 MB | Mac (Apple Silicon / Metal), CPU |
Alef-Biblical-1.5B-Q8_0.gguf |
1.5 GB | GPU CUDA (Jetson, RTX), melhor qualidade |
Nota: Use
llama-cpp-python. Ollama não é recomendado para este modelo (não bufferiza bytes UTF-8 incompletos do tokenizador Qwen3).
Como usar
Transformers
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "plvictor/Alef-Biblical-1.5B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
messages = [
{"role": "system", "content": "Você se chama Alef. Ajude cristãos e buscadores a conhecerem melhor a Bíblia em português."},
{"role": "user", "content": "O que Jesus quis dizer com 'o maior entre vós será servo de todos'?"}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=512, do_sample=True, temperature=0.7)
print(tokenizer.decode(output[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
GGUF com llama-cpp-python
# Mac (Metal)
CMAKE_ARGS="-DGGML_METAL=on" pip install llama-cpp-python
# CUDA (Jetson / RTX)
CMAKE_ARGS="-DGGML_CUDA=on" pip install llama-cpp-python
from llama_cpp import Llama
llm = Llama.from_pretrained(
repo_id="plvictor/Alef-Biblical-1.5B-Instruct",
filename="gguf/Alef-Biblical-1.5B-Q4_K_M.gguf", # ou Q8_0 pra GPU
n_gpu_layers=-1,
n_ctx=4096,
verbose=False
)
response = llm.create_chat_completion(
messages=[
{"role": "system", "content": "Você se chama Alef. Ajude cristãos e buscadores a conhecerem melhor a Bíblia em português."},
{"role": "user", "content": "Me explica o Salmo 23."}
],
max_tokens=512,
temperature=0.7
)
print(response["choices"][0]["message"]["content"])
Personalidade
O Alef foi treinado com uma voz definida:
- Direto — quando a pergunta é simples, responde simples; quando é profunda, vai fundo
- Acolhedor — em momentos de dor, responde como um amigo de verdade, sem papo de chatbot
- Com convicção — fala o que acredita, não fica neutro o tempo todo como Wikipedia
- Bom humor — leveza na hora certa
- Não se chama de IA — é o Alef
O SFT capturou bem essa personalidade — quem testa geralmente nota a diferença em relação a modelos genéricos.
Resultados e honestidade
O Alef é um modelo de 1.5B parâmetros treinado por uma pessoa só, em alguns dias de GPU. Não compete com GPT-4 ou modelos maiores. O que ele faz bem:
- Conversar sobre Bíblia em português com profundidade e calor humano
- Responder perguntas teológicas e devocionais com contexto
- Rodar localmente em hardware acessível (Mac, Jetson)
O que ele não faz tão bem:
- Raciocínio complexo de múltiplos passos
- Temas fora do domínio bíblico/cristão
- Comparado a modelos 7B+, a qualidade cai em perguntas muito elaboradas
Limitações
- Especializado em PT-BR e conteúdo cristão; não adequado para uso genérico
- Pode refletir perspectivas teológicas do corpus de treino
- Não substitui orientação pastoral ou aconselhamento profissional
Sobre o criador
Desenvolvido por Paulo Victor Souza — desenvolvedor brasileiro, construindo projetos de IA em português.
Site: plvictor.com · HuggingFace: plvictor
Licença
Apache 2.0
- Downloads last month
- 1
Model tree for plvictor/Alef-Biblical-1.5B-Instruct
Base model
Qwen/Qwen3-1.7B-Base
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="plvictor/Alef-Biblical-1.5B-Instruct", filename="", )