Instructions to use Danielbrdz/Barcenas-2.7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Danielbrdz/Barcenas-2.7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Danielbrdz/Barcenas-2.7b", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Danielbrdz/Barcenas-2.7b", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Danielbrdz/Barcenas-2.7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Danielbrdz/Barcenas-2.7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Danielbrdz/Barcenas-2.7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Danielbrdz/Barcenas-2.7b
- SGLang
How to use Danielbrdz/Barcenas-2.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-2.7b" \ --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": "Danielbrdz/Barcenas-2.7b", "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 "Danielbrdz/Barcenas-2.7b" \ --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": "Danielbrdz/Barcenas-2.7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Danielbrdz/Barcenas-2.7b with Docker Model Runner:
docker model run hf.co/Danielbrdz/Barcenas-2.7b
Barcenas 2.7b is a small language model (SLM) with 2.7 billion parameters, based on the Phi-2 model by Microsoft.
It inherits the outstanding reasoning and language understanding capabilities of Phi-2, which showcases state-of-the-art performance among base language models with less than 13 billion parameters.
Barcenas 2.7b also incorporates the features of the phi-2-NaturalChat model by Onymity, which is a fine-tuned version of Phi-2 for natural and engaging chat conversations based on GPT-4.
Barcenas 2.7b is designed to handle a variety of tasks, such as question answering, code generation, and natural chat, using high-quality and synthetic training data.
Made with ❤️ in Guadalupe, Nuevo Leon, Mexico 🇲🇽
- Downloads last month
- 7