Instructions to use Felipecezar01/dlf-v1-tecnologia with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Felipecezar01/dlf-v1-tecnologia with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Felipecezar01/dlf-v1-tecnologia")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Felipecezar01/dlf-v1-tecnologia") model = AutoModelForCausalLM.from_pretrained("Felipecezar01/dlf-v1-tecnologia", device_map="auto") - PEFT
How to use Felipecezar01/dlf-v1-tecnologia with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Felipecezar01/dlf-v1-tecnologia with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Felipecezar01/dlf-v1-tecnologia" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Felipecezar01/dlf-v1-tecnologia", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Felipecezar01/dlf-v1-tecnologia
- SGLang
How to use Felipecezar01/dlf-v1-tecnologia 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 "Felipecezar01/dlf-v1-tecnologia" \ --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": "Felipecezar01/dlf-v1-tecnologia", "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 "Felipecezar01/dlf-v1-tecnologia" \ --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": "Felipecezar01/dlf-v1-tecnologia", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Felipecezar01/dlf-v1-tecnologia with Docker Model Runner:
docker model run hf.co/Felipecezar01/dlf-v1-tecnologia
DLF V1 — Tecnologia
DLF V1 é um modelo de linguagem em português especializado em respostas sobre tecnologia.
O modelo foi desenvolvido a partir do
pierreguillou/gpt2-small-portuguese
por meio de instruction tuning utilizando LoRA (Low-Rank Adaptation).
Após o treinamento, os pesos LoRA foram incorporados ao modelo-base, produzindo esta versão standalone, que pode ser carregada diretamente com a biblioteca Transformers sem depender de PEFT ou de um adaptador separado.
Dataset
O treinamento utilizou uma base com aproximadamente 1.200 pares no formato:
instructioninputoutput
A base é predominantemente composta por perguntas e respostas relacionadas à área de tecnologia.
Configuração DLF V1
- Modelo-base:
pierreguillou/gpt2-small-portuguese - Técnica: LoRA / PEFT
- LoRA rank (
r): 16 - LoRA alpha: 32
- Target modules:
c_attn,c_proj,c_fc - Learning rate:
2e-4 - Warmup ratio:
0.05 - Batch físico: 4
- Batch efetivo: 8
- Máximo de épocas: 10
- Early stopping: ativo
- Patience: 3
- Melhor checkpoint: época 6
- Treinamento encerrado: época 9
Modelo standalone
O adaptador LoRA foi consolidado com o modelo-base utilizando merge_and_unload().
O artefato publicado neste repositório contém aproximadamente 124 milhões de parâmetros e pode ser carregado diretamente com AutoModelForCausalLM.
Limitações
O modelo possui aproximadamente 124 milhões de parâmetros e foi treinado em uma base relativamente pequena e especializada.
A base apresentou melhor confiabilidade em conteúdo conceitual do que em exemplos contendo código. Portanto, respostas envolvendo geração de código podem apresentar erros ou inconsistências.
O modelo também não possui acesso à internet, RAG ou fontes externas de conhecimento.
Projeto
Modelo desenvolvido no projeto DLF, como atividade acadêmica de Introdução ao Machine Learning.
- Downloads last month
- 237
Model tree for Felipecezar01/dlf-v1-tecnologia
Base model
pierreguillou/gpt2-small-portuguese