Instructions to use DrChamyoung/Xieral-Code-Gen-3B-Model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use DrChamyoung/Xieral-Code-Gen-3B-Model with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="DrChamyoung/Xieral-Code-Gen-3B-Model", filename="Xieral-Code-Gen-3B-Model.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use DrChamyoung/Xieral-Code-Gen-3B-Model with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf DrChamyoung/Xieral-Code-Gen-3B-Model # Run inference directly in the terminal: llama-cli -hf DrChamyoung/Xieral-Code-Gen-3B-Model
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf DrChamyoung/Xieral-Code-Gen-3B-Model # Run inference directly in the terminal: llama-cli -hf DrChamyoung/Xieral-Code-Gen-3B-Model
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 DrChamyoung/Xieral-Code-Gen-3B-Model # Run inference directly in the terminal: ./llama-cli -hf DrChamyoung/Xieral-Code-Gen-3B-Model
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 DrChamyoung/Xieral-Code-Gen-3B-Model # Run inference directly in the terminal: ./build/bin/llama-cli -hf DrChamyoung/Xieral-Code-Gen-3B-Model
Use Docker
docker model run hf.co/DrChamyoung/Xieral-Code-Gen-3B-Model
- LM Studio
- Jan
- Ollama
How to use DrChamyoung/Xieral-Code-Gen-3B-Model with Ollama:
ollama run hf.co/DrChamyoung/Xieral-Code-Gen-3B-Model
- Unsloth Studio new
How to use DrChamyoung/Xieral-Code-Gen-3B-Model 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 DrChamyoung/Xieral-Code-Gen-3B-Model 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 DrChamyoung/Xieral-Code-Gen-3B-Model to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for DrChamyoung/Xieral-Code-Gen-3B-Model to start chatting
- Docker Model Runner
How to use DrChamyoung/Xieral-Code-Gen-3B-Model with Docker Model Runner:
docker model run hf.co/DrChamyoung/Xieral-Code-Gen-3B-Model
- Lemonade
How to use DrChamyoung/Xieral-Code-Gen-3B-Model with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull DrChamyoung/Xieral-Code-Gen-3B-Model
Run and chat with the model
lemonade run user.Xieral-Code-Gen-3B-Model-{{QUANT_TAG}}List all available models
lemonade list
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf DrChamyoung/Xieral-Code-Gen-3B-Model# Run inference directly in the terminal:
llama-cli -hf DrChamyoung/Xieral-Code-Gen-3B-ModelUse 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 DrChamyoung/Xieral-Code-Gen-3B-Model# Run inference directly in the terminal:
./llama-cli -hf DrChamyoung/Xieral-Code-Gen-3B-ModelBuild 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 DrChamyoung/Xieral-Code-Gen-3B-Model# Run inference directly in the terminal:
./build/bin/llama-cli -hf DrChamyoung/Xieral-Code-Gen-3B-ModelUse Docker
docker model run hf.co/DrChamyoung/Xieral-Code-Gen-3B-ModelXieral Code Gen 3B
Xieral Code Gen 3B is a decoder-only language model with 2.7 billion parameters. Developed from the Xieral-Code-Gen-3b, this model is designed specifically for code generation and software engineering tasks.
Model Overview
- Architecture: Decoder-only language model
- Parameters: 2.7 billion
- Training Data: Combination of publicly available and synthetic datasets
- Optimization: Direct Preference Optimization (DPO)
- Fine-tuning: General code/software engineering conversations, SQL query generation, and discussion
Performance
Xieral Code Gen 3B has demonstrated competitive performance compared to other models of similar size:
- MultiPL-E Metrics: Evaluated across various programming languages using the BigCode Evaluation Harness.
- MT Bench: Shows strong results on code-related tasks.
Usage
This model is well-suited for:
- General code/software engineering conversations
- SQL query generation and discussion
Requirements
To run Xieral Code Gen 3B locally, you will need:
- VRAM: 8GB+ (Graphics card with sufficient VRAM)
- Dependencies: Ensure you have the necessary libraries and environment set up to run the model.
Installation
To install the required dependencies, use:
pip install -r requirements.txt
- Downloads last month
- 4
We're not able to determine the quantization variants.
Install from brew
# Start a local OpenAI-compatible server with a web UI: llama-server -hf DrChamyoung/Xieral-Code-Gen-3B-Model# Run inference directly in the terminal: llama-cli -hf DrChamyoung/Xieral-Code-Gen-3B-Model