Dedicated Endpoints

Run this model inference on single tenant GPU with unmatched speed and reliability at scale.

Learn more
Container

Run this model inference with full control and performance in your environment.

Learn more

Get help setting up a custom Dedicated Endpoints.

Talk with our engineer to get a quote for reserved GPU instances with discounts.

README

License: apache-2.0

Model Description

This model is a fine-tuned version of Qwen2.5-7B-Instruct, optimized using Unsloth and quantized to 4-bit (bitsandbytes) .

The primary fine-tuning objective focuses on Vietnamese Legal Domain Mastery and Context-Based Question Answering (RAG). Unlike general-purpose LLMs that reply strictly from pre-trained parametric memory, this model is specifically aligned to prioritize and reason directly over the provided context (legal articles, decrees, and circulars), drastically reducing hallucination and ensuring high-fidelity legal consulting.

Key Enhancements:

  • Strict Context Adherence: Tuned to extract facts and formulate arguments heavily based on the input context—making it perfect for Retrieval-Augmented Generation (RAG) pipelines.
  • Legal Formalism: Adopts the authoritative, formal, and precise tone required in the Vietnamese administrative and legal sectors.
  • Hardware Efficiency: Operates smoothly within a ~6GB VRAM footprint during inference, leaving ample head-room for long contexts and tool-calling structures.

Model Details

PropertyValue
Base ModelQwen/Qwen2.5-7B-Instruct
Parameters7 Billion
Quantization4-bit (bitsandbytes / bnb-4bit)
Fine-tuning MethodQLoRA (Rank 16, Alpha 32)
Primary TaskContext-Driven Legal Q&A / Legal Agent

Deployment & Inference (vLLM)

To host this model using vLLM on standard cloud environments.

Start the vLLM Server:

bash

!python -m vllm.entrypoints.openai.api_server \
--model unsloth/Qwen2.5-7B-Instruct-bnb-4bit \
--max-model-len 2048 \ # Can be changed
--dtype float16 \
--api-key 'your-api-key-here' \
--max-num-seqs 16 \
--trust-remote-code \
--gpu-memory-utilization 0.85 \ # Can be changed
--enforce-eager \
--enable-auto-tool-choice \
--tool-call-parser hermes \
--port 8000 &

Model provider

bqbbao6

Model tree

Base

unsloth/Qwen2.5-7B-Instruct-bnb-4bit

Fine-tuned

this model

Modalities

Input

Text

Output

Text

Pricing

Dedicated Endpoints

View details

Supported Functionality

Model APIs

Dedicated Endpoints

Container

More information

Explore FriendliAI today