Instructions to use GalvinNguyen/vian_ai_shop_small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use GalvinNguyen/vian_ai_shop_small with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-3-4b-it") model = PeftModel.from_pretrained(base_model, "GalvinNguyen/vian_ai_shop_small") - Transformers
How to use GalvinNguyen/vian_ai_shop_small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GalvinNguyen/vian_ai_shop_small") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("GalvinNguyen/vian_ai_shop_small") model = AutoModelForMultimodalLM.from_pretrained("GalvinNguyen/vian_ai_shop_small") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GalvinNguyen/vian_ai_shop_small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GalvinNguyen/vian_ai_shop_small" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GalvinNguyen/vian_ai_shop_small", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GalvinNguyen/vian_ai_shop_small
- SGLang
How to use GalvinNguyen/vian_ai_shop_small 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 "GalvinNguyen/vian_ai_shop_small" \ --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": "GalvinNguyen/vian_ai_shop_small", "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 "GalvinNguyen/vian_ai_shop_small" \ --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": "GalvinNguyen/vian_ai_shop_small", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use GalvinNguyen/vian_ai_shop_small with Docker Model Runner:
docker model run hf.co/GalvinNguyen/vian_ai_shop_small
Model Card for Vian ai Fine-Tuned
Model Details
Model Description
- Developed by: Glavinnguyen
- Model type: Text Generation / Multimodal (Text/Vision/Audio Interface)
- Language(s) (NLP): Vietnamese (Primary), English (Primary)
- License: mit
- Finetuned from model: google/gemma-3-4b-it
Model Sources
- Repository: [More Information Needed]
Uses
Direct Use
This model is specifically fine-tuned on a small-scale dataset to standardize response formatting, style, and structure. It natively retains the advanced deep reasoning mechanisms (<|think|>) and inherent logical problem-solving capabilities of the base Gemma 3 architecture.
Out-of-Scope Use
The model should not be used for tasks requiring extensive broad-domain knowledge expansion outside the scope of the training dataset without human supervision. The fine-tuning process was focused on structuring behavioral output rather than massive knowledge injection.
Training Details
Training Data
The model was trained on a highly curated, high-quality alignment dataset.
Training Procedure
Training was conducted utilizing the QLoRA (Quantized Low-Rank Adaptation) method to minimize hardware resource consumption while aggressively preserving the base model's pre-trained weights.
Training Hyperparameters
The hyperparameters were carefully optimized for an ultra-small dataset to prevent catastrophic overfitting and achieve an ideal convergence point:
- Training regime: QLoRA (FP16/BF16 Mixed Precision)
- Learning Rate: 2e-4 to 1e-5 (Low Learning Rate)
- Per Device Train Batch Size: 1
- Gradient Accumulation Steps: 32 (Global Batch Size = 32)
- Number of Train Epochs: 1 to 2
- Max Length: 256 - 2048 tokens (Allocated to safeguard the generation of
<|think|>tokens) - Optimizer: AdamW
- LR Scheduler Type: Cosine / Constant
- LoRA Rank (r): 4 or 8
- LoRA Alpha ($\alpha$): 8 or 16
Speeds, Sizes, Times
- Final Training Loss:
0.69(The sweet spot convergence for low-sample fine-tuning—balancing structural alignment with base intelligence retention). - VRAM Consumption: ~2.2 GB (When running on a 4-bit Q4_0 execution profile).
Technical Specifications
Model Architecture and Objective
Built upon Google's next-generation Gemma 3 architecture, featuring integrated Quantization Aware Training (QAT) and an intrinsic multi-token prediction (MTP) engine. The model leverages an internal step-by-step reasoning loop before routing structural text outputs via designated generation tags.
Model Card Contact
- Contact: Glavinnguyen
Framework versions
- PEFT 0.19.1
- Downloads last month
- 756