Instructions to use Danielbrdz/Barcenas-LFM3-1.7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Danielbrdz/Barcenas-LFM3-1.7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Danielbrdz/Barcenas-LFM3-1.7B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Danielbrdz/Barcenas-LFM3-1.7B", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("Danielbrdz/Barcenas-LFM3-1.7B", trust_remote_code=True, device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Danielbrdz/Barcenas-LFM3-1.7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Danielbrdz/Barcenas-LFM3-1.7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Danielbrdz/Barcenas-LFM3-1.7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Danielbrdz/Barcenas-LFM3-1.7B
- SGLang
How to use Danielbrdz/Barcenas-LFM3-1.7B 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 "Danielbrdz/Barcenas-LFM3-1.7B" \ --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": "Danielbrdz/Barcenas-LFM3-1.7B", "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 "Danielbrdz/Barcenas-LFM3-1.7B" \ --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": "Danielbrdz/Barcenas-LFM3-1.7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Danielbrdz/Barcenas-LFM3-1.7B with Docker Model Runner:
docker model run hf.co/Danielbrdz/Barcenas-LFM3-1.7B
Barcenas LFM3 1.7B
Basado en el LFM3 1.7B de Liquid AI y entrenado con el dataset SFT General Spanish 50K
Este es uno de los modelos más eficientes que he entrenado
A pesar de su tamaño, ofrece un rendimiento comparable al de modelos de entre 4B y 9B parámetros en uso agéntico
El objetivo de este entrenamiento es mejorar su dominio del español, para que los hispanohablantes puedan ejecutarlo de forma local y usarlo con soltura en nuestro idioma
Gracias a su reducido tamaño, funciona de manera ágil incluso en dispositivos modestos. Con una cuantización de 4 bits necesita aproximadamente 1 GB de RAM, por lo que puede ejecutarse hasta en un smartphone
Barcenas LFM3 1.7B
Based on Liquid AI’s LFM3 1.7B and trained using the SFT General Spanish 50K dataset
This is one of the most efficient models I have ever trained
Despite its size, it delivers performance comparable to models with 4B to 9B parameters when used for agentic tasks
The goal of this training is to improve its command of Spanish, allowing Spanish speakers to run it locally and use it fluently in our language
Thanks to its small footprint, it runs efficiently even on modest hardware. With 4-bit quantization, it requires approximately 1 GB of RAM, making it capable of running even on a smartphone
Made with ❤️ in Guadalupe, Nuevo Leon, Mexico 🇲🇽
- Downloads last month
- 457