Instructions to use lxcorp/Synap-2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lxcorp/Synap-2b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lxcorp/Synap-2b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("lxcorp/Synap-2b") model = AutoModelForCausalLM.from_pretrained("lxcorp/Synap-2b") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use lxcorp/Synap-2b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lxcorp/Synap-2b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lxcorp/Synap-2b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lxcorp/Synap-2b
- SGLang
How to use lxcorp/Synap-2b 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 "lxcorp/Synap-2b" \ --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": "lxcorp/Synap-2b", "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 "lxcorp/Synap-2b" \ --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": "lxcorp/Synap-2b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use lxcorp/Synap-2b with Docker Model Runner:
docker model run hf.co/lxcorp/Synap-2b
Synap-2b
Model Description
Synap-2b é um modelo de linguagem de 2B parâmetros desenvolvido pela λχ Corp. (Marius Jabami).
Foi projetado para tarefas de geração de texto e raciocínio matemático, com suporte a português e inglês.
O modelo foi fine-tunado usando o dataset orca-math-portuguese-64k, com foco em melhorar a compreensão de instruções e resolução de problemas matemáticos.
⚠️ Synap-2b é um modelo de base adaptado para seguir instruções, mas não passou por alinhamento RLHF.
Para uso em produção ou aplicações sensíveis, recomenda-se alinhamento e avaliação adicionais.
- Developed by: λχ Corp. (Marius Jabami)
- Model type: Large Language Model
- Language(s): Portuguese, English
- License: CC
- Access: Privado (uso via Space na Hugging Face)
Uses
Direct Use
O modelo pode ser usado para:
- Geração de texto
- Resolução de problemas matemáticos
- Chatbots educacionais
- Pesquisa em fine-tuning de LLMs
Out-of-Scope Use
- Idiomas diferentes de pt/en.
- Atividades maliciosas ou ilegais.
- Aplicações críticas sem avaliação adequada.
Bias, Risks, and Limitations
Como outros LLMs, o Synap-2b pode produzir respostas incorretas, enviesadas ou não confiáveis.
É recomendada validação antes do uso em sistemas finais.
How to Get Started with the Model
import torch
from transformers import pipeline
model_id = "lxcorp/Synap-2b"
pipe = pipeline(
"text-generation",
model=model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
text = pipe("Resolva: 2x + 5 = 15")
Training Details
Training Data
Treinado no dataset orca-math-portuguese-64k, especializado em problemas matemáticos e linguagem educacional.
Evaluation
Testing Data
Avaliado em MMLU, TriviaQA, ARC Easy & Challenge, Open Book QA, Common Sense QA, Physical Interaction QA, Social Interaction QA, HellaSwag, WinoGrande, Multilingual Knowledge QA.
Metrics
Accuracy para MMLU, ARC, OBQA, CSQA, PIQA, SIQA, HellaSwag, WinoGrande.
Exact match para TriviaQA, NQ e MKQA.
BLEU para tarefas multilíngues.
English Results
| Benchmark | Synap-2b | HF SmolLM2 (1.7B) | Gemma-2 (2.6B) | Llama-3.2 (3B) | Qwen2.5 (1.5B) |
|---|---|---|---|---|---|
| MMLU | 52.0 | 50.4 | 53.1 | 56.6 | 61.0 |
| NQ | 16.5 | 15.1 | 17.7 | 22.0 | 13.1 |
| TQA | 46.5 | 45.4 | 49.9 | 53.6 | 35.9 |
| ARC E | 82.2 | 81.8 | 81.1 | 84.6 | 89.7 |
| ARC C | 64.6 | 64.7 | 66.0 | 69.0 | 77.2 |
| OBQA | 65.4 | 61.4 | 64.6 | 68.4 | 73.8 |
| CSQA | 63.6 | 59.0 | 64.4 | 65.4 | 72.4 |
| PIQA | 78.5 | 77.7 | 79.8 | 78.9 | 76.0 |
| SIQA | 62.3 | 57.5 | 61.9 | 63.8 | 68.7 |
| HS | 73.6 | 73.2 | 74.7 | 76.9 | 67.5 |
| WG | 66.9 | 65.6 | 71.2 | 72.0 | 64.8 |
| Average | 61.1 | 59.3 | 62.2 | 64.7 | 63.6 |
Multilingual Results
| Benchmark | Synap-2b | Gemma-2 (2.6B) | Llama-3.2 (3B) |
|---|---|---|---|
| ARC E | 71.1 | 65.8 | 68.2 |
| ARC C | 54.8 | 51.1 | 52.6 |
| MMLU | 44.8 | 43.1 | 45.3 |
| HS | 51.9 | 49.9 | 48.4 |
| FLORES | 20.6 | 21.9 | 19.8 |
| MKQA | 16.5 | 17.2 | 19.7 |
| Average | 43.3 | 41.5 | 42.3 |
Technical Specifications
Model Architecture and Objective
| Hyperparameter | Value |
|---|---|
| Model dimension | 2048 |
| MLP dimension | 8192 |
| Layers | 28 |
| Heads | 16 |
| RoPE theta | 20,000 |
| Context size | 4096 |
| Max learning rate | 2.4e-04 |
| Total steps | 500,000 |
| Weight decay | 0.1 |
| Gradient clip | 1.0 |
Hardware
Treinado em GPUs NVIDIA (detalhes não divulgados publicamente).
Software
Treinado utilizando a biblioteca transformers.
Citation
@misc{synap2b2025, author = {Marius Jabami}, title = {Synap-2b: Fine-tuned 2B Language Model}, year = {2025}, howpublished = {\url{https://huggingface.co/lxcorp/Synap-2b}} }
- Downloads last month
- 5