--- language: - en - vi - id - th - zh license: apache-2.0 base_model: - Qwen/Qwen3-8B-Base base_model_relation: finetune library_name: transformers pipeline_tag: text-generation --- # Agnes-SeaLLM-8B ### Introduction We introduce Agnes-SeaLLM-8B, a compact Large Language Model (LLM) meticulously optimized for Southeast Asian languages. Despite its efficient footprint, it delivers performance rivaling much larger open-source models, excelling in tasks such as mathematical reasoning, translation, and instruction following. Furthermore, it has been specially tuned to enhance reliability, minimize hallucinations, and provide culturally sensitive, safe responses tailored to the Southeast Asian context. ![image.png](images/image.png) # πŸ”₯ Highlights Compact Efficiency & Rapid Deployment: Significantly smaller than mainstream LLMs, Agnes-SeaLLM-8B enables high-speed inference and low-resource deployment without sacrificing accuracy or multilingual proficiency. It is the ideal choice for edge devices and resource-constrained environments. Top-Tier Performance in its Class: Outperforms comparable open-source models across multi-dimensional benchmarks, including academic examinations, complex instruction following, mathematics, and high-precision translation. Superior Instruction Following: Demonstrates exceptional capability in handling multi-turn dialogues and executing complex, nuanced tasks with high fidelity. Safe, Reliable, and Culturally Aware: Engineered to reduce hallucinations and increase sensitivity to Southeast Asian cultural nuances. This ensures safer interactions while maintaining peak performance in English and Chinese. Balanced Multilingual Mastery: Maintains high-quality, consistent output across a broad linguistic spectrum, overcoming the "seesaw effect" often found in regional models. ### 【SeaExam Summary statistics】
Model avg M3Exam MMLU
Agnes-SeaLLM-8B 75.32 77.47 74.13
Llama-sea-Lion-v2-8B-IT 55.86 61.11 52.91
Sailor2-20B 67.50 74.15 63.77
glm-4-9b-chat 64.35 69.36 61.53
Meta-Llama-3-70B 63.67 64.25 63.55
- Agnes-SeaLLM-8B (75.32 avg) crushes 8B peers and outpaces Sailor2-20B, offering 70B-tier performance with compact, low-resource deployment. - Exceptional scores in both M3Exam and MMLU prove it bridges regional linguistic nuance with elite global reasoning. ### 【M3Exam Model evaluation sub-statistics】
Model avg M3Exam
zh
M3Exam
en
M3Exam
id
M3Exam
vi
M3Exam
th
Agnes-SeaLLM-8B 76.84 83.70 93.24 72.97 70.03 64.25
Llama-sea-Lion-v2-8B-IT 59.95 52.95 78.41 54.37 54.00 60.00
Sailor2-20B 74.96 80.90 88.94 69.68 68.65 66.65
glm-4-9b-chat 71.62 85.71 89.78 63.16 66.02 53.43
Meta-Llama-3-70B 63.82 63.04 84.75 57.97 52.02 61.32
- With a 71.29 average, Agnes-SeaLLM-8B delivers "70B-class" performance in an 8B footprint, outperforming the 20B Sailor2 and crushing 8B peers like Llama-3 and GLM-4. - It sets a new benchmark for Southeast Asia, achieving top-tier scores in Indonesian (72.97) and Vietnamese (70.03)**, while maintaining elite English (93.24) and Chinese (83.70) proficiency. ### 【MMLU Model evaluation sub-statistics】
Model avg MMLU
zh
MMLU
en
MMLU
id
MMLU
vi
MMLU
th
Agnes-SeaLLM-8B 71.29 71.40 78.60 71.54 66.84 62.70
Llama-sea-Lion-v2-8B-IT 55.86 49.58 61.65 54.42 47.72 51.19
Sailor2-20B 67.50 64.84 72.88 64.60 59.58 56.95
glm-4-9b-chat 63.35 64.84 72.42 60.04 60.04 50.32
Meta-Llama-3-70B 58.21 63.35 60.91 72.32 62.95 62.35
### 【Indonesian Fine-grained discipline statistics】
Indonesian Standards Agnes-SeaLLM-8B Sailor2-20B glm-4-9b-chat Llama-sea-Lion-v2-8B Meta-Llama-3-8B
Overall Average 73.37 64.60 60.04 54.42 54.60
abstract_algebra64.0048.0034.0028.0032.00
anatomy70.0062.0046.0046.0050.00
astronomy90.0068.0064.0066.0058.00
business_ethics68.0060.0056.0064.0056.00
clinical_knowledge84.0066.0068.0064.0066.00
college_biology98.0084.0068.0060.0062.00
college_chemistry70.0038.0050.0040.0042.00
college_computer_science74.0054.0052.0036.0038.00
college_mathematics60.0038.0042.0032.0038.00
college_medicine86.0066.0074.0068.0064.00
college_physics82.0068.0060.0038.0044.00
computer_security80.0086.0064.0050.0056.00
conceptual_physics84.0068.0072.0044.0046.00
elementary_mathematics92.0078.0078.0072.0080.00
high_school_biology90.0084.0080.0070.0074.00
high_school_chemistry94.0050.0062.0054.0050.00
high_school_mathematics86.0044.0064.0044.0054.00
international_law68.0080.0084.0078.0074.00
marketing90.0082.0070.0078.0068.00
sociology80.0068.0066.0070.0064.00
world_religions76.0084.0076.0066.0076.00
### 【MMLU Fine-grained discipline statistics】
language / subject Correct Total Accuracy Percentage
chinese2176285076.35%12.81%
chinese β†’ abstract_algebra365072.00%0.22%
chinese β†’ anatomy315062.00%0.22%
chinese β†’ astronomy425084.00%0.22%
chinese β†’ business_ethics365072.00%0.22%
chinese β†’ clinical_knowledge405080.00%0.22%
chinese β†’ college_biology465092.00%0.22%
chinese β†’ college_chemistry375074.00%0.22%
chinese β†’ college_computer_science405080.00%0.22%
chinese β†’ college_mathematics345068.00%0.22%
chinese β†’ college_medicine425084.00%0.22%
chinese β†’ college_physics465092.00%0.22%
chinese β†’ computer_security395078.00%0.22%
chinese β†’ conceptual_physics455090.00%0.22%
chinese β†’ econometrics345068.00%0.22%
chinese β†’ electrical_engineering365072.00%0.22%
chinese β†’ elementary_mathematics485096.00%0.22%
chinese β†’ formal_logic315062.00%0.22%
chinese β†’ global_facts265052.00%0.22%
chinese β†’ high_school_biology465092.00%0.22%
chinese β†’ high_school_chemistry415082.00%0.22%
chinese β†’ high_school_computer_science475094.00%0.22%
chinese β†’ high_school_european_history415082.00%0.22%
chinese β†’ high_school_geography425084.00%0.22%
chinese β†’ high_school_government_and_politics425084.00%0.22%
chinese β†’ high_school_macroeconomics435086.00%0.22%
chinese β†’ high_school_mathematics415082.00%0.22%
chinese β†’ high_school_microeconomics435086.00%0.22%
chinese β†’ high_school_physics405080.00%0.22%
chinese β†’ high_school_psychology475094.00%0.22%
chinese β†’ high_school_statistics405080.00%0.22%
chinese β†’ high_school_us_history365072.00%0.22%
chinese β†’ high_school_world_history425084.00%0.22%
chinese β†’ human_aging315062.00%0.22%
chinese β†’ human_sexuality415082.00%0.22%
chinese β†’ international_law345068.00%0.22%
chinese β†’ jurisprudence335066.00%0.22%
chinese β†’ logical_fallacies375074.00%0.22%
chinese β†’ machine_learning365072.00%0.22%
chinese β†’ management405080.00%0.22%
chinese β†’ marketing445088.00%0.22%
chinese β†’ medical_genetics415082.00%0.22%
chinese β†’ miscellaneous355070.00%0.22%
chinese β†’ moral_disputes345068.00%0.22%
chinese β†’ moral_scenarios345068.00%0.22%
chinese β†’ nutrition415082.00%0.22%
chinese β†’ philosophy255050.00%0.22%
chinese β†’ prehistory375074.00%0.22%
chinese β†’ professional_accounting325064.00%0.22%
chinese β†’ professional_law285056.00%0.22%
chinese β†’ professional_medicine395078.00%0.22%
chinese β†’ professional_psychology395078.00%0.22%
chinese β†’ public_relations345068.00%0.22%
chinese β†’ security_studies405080.00%0.22%
chinese β†’ sociology385076.00%0.22%
chinese β†’ us_foreign_policy435086.00%0.22%
chinese β†’ virology245048.00%0.22%
chinese β†’ world_religions365072.00%0.22%
english2402285084.28%12.81%
english β†’ abstract_algebra385076.00%0.22%
english β†’ anatomy405080.00%0.22%
english β†’ astronomy435086.00%0.22%
english β†’ business_ethics395078.00%0.22%
english β†’ clinical_knowledge455090.00%0.22%
english β†’ college_biology495098.00%0.22%
english β†’ college_chemistry355070.00%0.22%
english β†’ college_computer_science435086.00%0.22%
english β†’ college_mathematics415082.00%0.22%
english β†’ college_medicine475094.00%0.22%
english β†’ college_physics435086.00%0.22%
english β†’ computer_security415082.00%0.22%
english β†’ conceptual_physics445088.00%0.22%
english β†’ econometrics445088.00%0.22%
english β†’ electrical_engineering395078.00%0.22%
english β†’ elementary_mathematics495098.00%0.22%
english β†’ formal_logic365072.00%0.22%
english β†’ global_facts265052.00%0.22%
english β†’ high_school_biology455090.00%0.22%
english β†’ high_school_chemistry475094.00%0.22%
english β†’ high_school_computer_science5050100.00%0.22%
english β†’ high_school_european_history455090.00%0.22%
english β†’ high_school_geography455090.00%0.22%
english β†’ high_school_government_and_politics485096.00%0.22%
english β†’ high_school_macroeconomics425084.00%0.22%
english β†’ high_school_mathematics405080.00%0.22%
english β†’ high_school_microeconomics485096.00%0.22%
english β†’ high_school_physics465092.00%0.22%
english β†’ high_school_psychology465092.00%0.22%
english β†’ high_school_statistics415082.00%0.22%
english β†’ high_school_us_history455090.00%0.22%
english β†’ high_school_world_history435086.00%0.22%
english β†’ human_aging385076.00%0.22%
english β†’ human_sexuality455090.00%0.22%
english β†’ international_law405080.00%0.22%
english β†’ jurisprudence445088.00%0.22%
english β†’ logical_fallacies455090.00%0.22%
english β†’ machine_learning345068.00%0.22%
english β†’ management465092.00%0.22%
english β†’ marketing465092.00%0.22%
english β†’ medical_genetics465092.00%0.22%
english β†’ miscellaneous465092.00%0.22%
english β†’ moral_disputes435086.00%0.22%
english β†’ moral_scenarios405080.00%0.22%
english β†’ nutrition445088.00%0.22%
english β†’ philosophy405080.00%0.22%
english β†’ prehistory465092.00%0.22%
english β†’ professional_accounting375074.00%0.22%
english β†’ professional_law325064.00%0.22%
english β†’ professional_medicine435086.00%0.22%
english β†’ professional_psychology405080.00%0.22%
english β†’ public_relations345068.00%0.22%
english β†’ security_studies395078.00%0.22%
english β†’ sociology415082.00%0.22%
english β†’ us_foreign_policy445088.00%0.22%
english β†’ virology305060.00%0.22%
english β†’ world_religions465092.00%0.22%
indonesian2091285073.37%12.81%
indonesian β†’ abstract_algebra325064.00%0.22%
indonesian β†’ anatomy355070.00%0.22%
indonesian β†’ astronomy455090.00%0.22%
indonesian β†’ business_ethics345068.00%0.22%
indonesian β†’ clinical_knowledge425084.00%0.22%
indonesian β†’ college_biology495098.00%0.22%
indonesian β†’ college_chemistry355070.00%0.22%
indonesian β†’ college_computer_science375074.00%0.22%
indonesian β†’ college_mathematics305060.00%0.22%
indonesian β†’ college_medicine435086.00%0.22%
indonesian β†’ college_physics415082.00%0.22%
indonesian β†’ computer_security405080.00%0.22%
indonesian β†’ conceptual_physics425084.00%0.22%
indonesian β†’ econometrics355070.00%0.22%
indonesian β†’ electrical_engineering325064.00%0.22%
indonesian β†’ elementary_mathematics465092.00%0.22%
indonesian β†’ formal_logic315062.00%0.22%
indonesian β†’ global_facts285056.00%0.22%
indonesian β†’ high_school_biology455090.00%0.22%
indonesian β†’ high_school_chemistry475094.00%0.22%
indonesian β†’ high_school_computer_science455090.00%0.22%
indonesian β†’ high_school_european_history315062.00%0.22%
indonesian β†’ high_school_geography425084.00%0.22%
indonesian β†’ high_school_government_and_politics375074.00%0.22%
indonesian β†’ high_school_macroeconomics385076.00%0.22%
indonesian β†’ high_school_mathematics435086.00%0.22%
indonesian β†’ high_school_microeconomics435086.00%0.22%
indonesian β†’ high_school_physics425084.00%0.22%
indonesian β†’ high_school_psychology425084.00%0.22%
indonesian β†’ high_school_statistics405080.00%0.22%
indonesian β†’ high_school_us_history385076.00%0.22%
indonesian β†’ high_school_world_history405080.00%0.22%
indonesian β†’ human_aging235046.00%0.22%
indonesian β†’ human_sexuality415082.00%0.22%
indonesian β†’ international_law345068.00%0.22%
indonesian β†’ jurisprudence345068.00%0.22%
indonesian β†’ logical_fallacies305060.00%0.22%
indonesian β†’ machine_learning325064.00%0.22%
indonesian β†’ management385076.00%0.22%
indonesian β†’ marketing455090.00%0.22%
indonesian β†’ medical_genetics445088.00%0.22%
indonesian β†’ miscellaneous355070.00%0.22%
indonesian β†’ moral_disputes405080.00%0.22%
indonesian β†’ moral_scenarios325064.00%0.22%
indonesian β†’ nutrition395078.00%0.22%
indonesian β†’ philosophy275054.00%0.22%
indonesian β†’ prehistory345068.00%0.22%
indonesian β†’ professional_accounting235046.00%0.22%
indonesian β†’ professional_law185036.00%0.22%
indonesian β†’ professional_medicine365072.00%0.22%
indonesian β†’ professional_psychology315062.00%0.22%
indonesian β†’ public_relations315062.00%0.22%
indonesian β†’ security_studies345068.00%0.22%
indonesian β†’ sociology405080.00%0.22%
indonesian β†’ us_foreign_policy345068.00%0.22%
indonesian β†’ virology285056.00%0.22%
indonesian β†’ world_religions385076.00%0.22%
thai1897285066.56%12.81%
thai β†’ abstract_algebra275054.00%0.22%
thai β†’ anatomy275054.00%0.22%
thai β†’ astronomy445088.00%0.22%
thai β†’ business_ethics365072.00%0.22%
thai β†’ clinical_knowledge385076.00%0.22%
thai β†’ college_biology425084.00%0.22%
thai β†’ college_chemistry285056.00%0.22%
thai β†’ college_computer_science305060.00%0.22%
thai β†’ college_mathematics275054.00%0.22%
thai β†’ college_medicine395078.00%0.22%
thai β†’ college_physics395078.00%0.22%
thai β†’ computer_security415082.00%0.22%
thai β†’ conceptual_physics375074.00%0.22%
thai β†’ econometrics295058.00%0.22%
thai β†’ electrical_engineering365072.00%0.22%
thai β†’ elementary_mathematics495098.00%0.22%
thai β†’ formal_logic245048.00%0.22%
thai β†’ global_facts215042.00%0.22%
thai β†’ high_school_biology385076.00%0.22%
thai β†’ high_school_chemistry375074.00%0.22%
thai β†’ high_school_computer_science415082.00%0.22%
thai β†’ high_school_european_history385076.00%0.22%
thai β†’ high_school_geography375074.00%0.22%
thai β†’ high_school_government_and_politics355070.00%0.22%
thai β†’ high_school_macroeconomics435086.00%0.22%
thai β†’ high_school_mathematics415082.00%0.22%
thai β†’ high_school_microeconomics375074.00%0.22%
thai β†’ high_school_physics385076.00%0.22%
thai β†’ high_school_psychology345068.00%0.22%
thai β†’ high_school_statistics345068.00%0.22%
thai β†’ high_school_us_history335066.00%0.22%
thai β†’ high_school_world_history385076.00%0.22%
thai β†’ human_aging255050.00%0.22%
thai β†’ human_sexuality325064.00%0.22%
thai β†’ international_law335066.00%0.22%
thai β†’ jurisprudence285056.00%0.22%
thai β†’ logical_fallacies305060.00%0.22%
thai β†’ machine_learning315062.00%0.22%
thai β†’ management335066.00%0.22%
thai β†’ marketing365072.00%0.22%
thai β†’ medical_genetics365072.00%0.22%
thai β†’ miscellaneous375074.00%0.22%
thai β†’ moral_disputes295058.00%0.22%
thai β†’ moral_scenarios345068.00%0.22%
thai β†’ nutrition405080.00%0.22%
thai β†’ philosophy295058.00%0.22%
thai β†’ prehistory305060.00%0.22%
thai β†’ professional_accounting275054.00%0.22%
thai β†’ professional_law195038.00%0.22%
thai β†’ professional_medicine355070.00%0.22%
thai β†’ professional_psychology265052.00%0.22%
thai β†’ public_relations265052.00%0.22%
thai β†’ security_studies285056.00%0.22%
thai β†’ sociology295058.00%0.22%
thai β†’ us_foreign_policy305060.00%0.22%
thai β†’ virology265052.00%0.22%
thai β†’ world_religions305060.00%0.22%
vietnamese1997285070.07%12.81%
vietnamese β†’ abstract_algebra355070.00%0.22%
vietnamese β†’ anatomy245048.00%0.22%
vietnamese β†’ astronomy445088.00%0.22%
vietnamese β†’ business_ethics325064.00%0.22%
vietnamese β†’ clinical_knowledge405080.00%0.22%
vietnamese β†’ college_biology445088.00%0.22%
vietnamese β†’ college_chemistry345068.00%0.22%
vietnamese β†’ college_computer_science365072.00%0.22%
vietnamese β†’ college_mathematics315062.00%0.22%
vietnamese β†’ college_medicine455090.00%0.22%
vietnamese β†’ college_physics385076.00%0.22%
vietnamese β†’ computer_security405080.00%0.22%
vietnamese β†’ conceptual_physics425084.00%0.22%
vietnamese β†’ econometrics375074.00%0.22%
vietnamese β†’ electrical_engineering365072.00%0.22%
vietnamese β†’ elementary_mathematics445088.00%0.22%
vietnamese β†’ formal_logic295058.00%0.22%
vietnamese β†’ global_facts245048.00%0.22%
vietnamese β†’ high_school_biology435086.00%0.22%
vietnamese β†’ high_school_chemistry445088.00%0.22%
vietnamese β†’ high_school_computer_science465092.00%0.22%
vietnamese β†’ high_school_european_history325064.00%0.22%
vietnamese β†’ high_school_geography385076.00%0.22%
vietnamese β†’ high_school_government_and_politics365072.00%0.22%
vietnamese β†’ high_school_macroeconomics435086.00%0.22%
vietnamese β†’ high_school_mathematics445088.00%0.22%
vietnamese β†’ high_school_microeconomics435086.00%0.22%
vietnamese β†’ high_school_physics385076.00%0.22%
vietnamese β†’ high_school_psychology405080.00%0.22%
vietnamese β†’ high_school_statistics415082.00%0.22%
vietnamese β†’ high_school_us_history345068.00%0.22%
vietnamese β†’ high_school_world_history385076.00%0.22%
vietnamese β†’ human_aging215042.00%0.22%
vietnamese β†’ human_sexuality335066.00%0.22%
vietnamese β†’ international_law315062.00%0.22%
vietnamese β†’ jurisprudence335066.00%0.22%
vietnamese β†’ logical_fallacies335066.00%0.22%
vietnamese β†’ machine_learning275054.00%0.22%
vietnamese β†’ management385076.00%0.22%
vietnamese β†’ marketing395078.00%0.22%
vietnamese β†’ medical_genetics425084.00%0.22%
vietnamese β†’ miscellaneous315062.00%0.22%
vietnamese β†’ moral_disputes335066.00%0.22%
vietnamese β†’ moral_scenarios285056.00%0.22%
vietnamese β†’ nutrition425084.00%0.22%
vietnamese β†’ philosophy275054.00%0.22%
vietnamese β†’ prehistory345068.00%0.22%
vietnamese β†’ professional_accounting255050.00%0.22%
vietnamese β†’ professional_law195038.00%0.22%
vietnamese β†’ professional_medicine345068.00%0.22%
vietnamese β†’ professional_psychology285056.00%0.22%
vietnamese β†’ public_relations275054.00%0.22%
vietnamese β†’ security_studies325064.00%0.22%
vietnamese β†’ sociology315062.00%0.22%
vietnamese β†’ us_foreign_policy365072.00%0.22%
vietnamese β†’ virology245048.00%0.22%
vietnamese β†’ world_religions345068.00%0.22%
## πŸ“¦ SeaExam Evaluation Package ``` / β”œβ”€β”€ function.py # Main function β”œβ”€β”€ main.py # Main evaluation script β”œβ”€β”€ requirements.txt # Python dependencies β”œβ”€β”€ data/ # Test datasets (26MB) β”‚ β”œβ”€β”€ m3exam-chinese/ β”‚ β”œβ”€β”€ m3exam-english/ β”‚ β”œβ”€β”€ m3exam-indonesian/ β”‚ β”œβ”€β”€ m3exam-thai/ β”‚ β”œβ”€β”€ m3exam-vietnamese/ β”‚ β”œβ”€β”€ mmlu-chinese/ β”‚ β”œβ”€β”€ mmlu-english/ β”‚ β”œβ”€β”€ mmlu-indonesian/ β”‚ β”œβ”€β”€ mmlu-thai/ β”‚ └── mmlu-vietnamese/ β”œβ”€β”€ models/ # [YOU NEED TO ADD] Place your model here β”‚ └── Llama-SEA-LION-v2-8B-IT/ (or your model name) β”œβ”€β”€ README.md # This file └── quick_run.sh # Quick start script ``` ## πŸ”§ Prerequisites ### Hardware Requirements - **GPU**: Minimum 2 GPUs with 24GB+ VRAM each - **RAM**: 64GB+ recommended - **Storage**: ~20GB (model + data + outputs) ### Software Requirements - **OS**: Linux (tested on Ubuntu) - **Python**: 3.10 - 3.12 - **CUDA**: 12.x - **GPU Driver**: Latest NVIDIA driver ## πŸ“₯ Installation Steps ### 1. Copy this folder to your server ```bash # Example: Using scp scp -r Seaexam/ user@your-server:/path/to/destination/ # Or using rsync rsync -avz Seaexam/ user@your-server:/path/to/destination/Seaexam/ ``` ### 2. Prepare your model Place your model files in the `models/` directory: ```bash cd Seaexam mkdir -p models # Copy or download your model to models/Llama-SEA-LION-v2-8B-IT/ # The model directory should contain: # - config.json # - tokenizer files # - model weight files (.safetensors or .bin) ``` ### 3. Create Python virtual environment (recommended) ```bash cd Seaexam python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate ``` ### 4. Install dependencies ```bash conda create -n SeaExam python=3.12 conda activate SeaExam pip install --upgrade pip pip install -r requirements.txt ``` **Note**: This will install PyTorch, vLLM, and other dependencies. May take 10-20 minutes. ## βš™οΈ Configuration ### Method 1: Edit main.py directly Open `main.py` and modify the configuration section (lines 12-24): ```python # Set your model path MODEL_NAME = "./models/Llama-SEA-LION-v2-8B-IT" # Or use absolute path # GPU settings TENSOR_PARALLEL_SIZE = 2 # Number of GPUs (must match CUDA_VISIBLE_DEVICES) os.environ["CUDA_VISIBLE_DEVICES"] = "0,1" # GPU IDs to use # Batch size (adjust based on your GPU memory) BATCH_SIZE = 256 ``` ### Method 2: Use environment variable ```bash export MODEL_PATH="/path/to/your/model" export CUDA_VISIBLE_DEVICES="0,1" python main.py ``` ### Configuration Tips #### GPU Selection - Check available GPUs: `nvidia-smi` - Use specific GPUs: `CUDA_VISIBLE_DEVICES="0,1"` (uses GPU 0 and 1) - Match `TENSOR_PARALLEL_SIZE` with number of GPUs in `CUDA_VISIBLE_DEVICES` #### Memory Optimization If you encounter OOM (Out of Memory) errors: 1. Reduce `BATCH_SIZE` (e.g., 128, 64, 32) 2. Reduce `gpu_memory_utilization` in code (default 0.95 β†’ 0.8) 3. Reduce `max_model_len` (default 4096 β†’ 2048) ## πŸš€ Running the Evaluation ### Quick Start ```bash cd Seaexam source venv/bin/activate # If using virtual environment python main.py ``` ### Using the run script ```bash chmod +x quick_run.sh ./quick_run.sh ``` ### Monitor Progress The script shows a progress bar with real-time accuracy: ``` Inference: 45% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ | 2345/5000 [10:23<12:45] Acc: 67.23% ``` ### Resume from Checkpoint The script automatically saves progress to `progress.json`. If interrupted: - Just run the script again - It will resume from where it stopped ## πŸ“Š Output Files After completion, you will find: - `result.txt` - Detailed evaluation report with accuracy by language/subject - `progress.json` - Progress checkpoint (can be deleted after successful completion) ## πŸ” Verification Before running the full evaluation, verify your setup: ```bash # Check CUDA installation nvcc --version # Check GPU availability nvidia-smi # Check Python packages pip list | grep -E "torch|transformers|vllm" # Test model loading (Python) python -c "from transformers import AutoTokenizer; tokenizer = AutoTokenizer.from_pretrained('./models/Llama-SEA-LION-v2-8B-IT', trust_remote_code=True); print('Model loads successfully!')" ``` ## πŸ“ Expected Results - **Total Questions**: ~5000 (varies by data version) - **Runtime**: 1-3 hours (depends on hardware) - **Output Accuracy**: Model-dependent (typically 40-80%) ## ❓ Troubleshooting ### Issue: "No module named 'vllm'" **Solution**: Install dependencies: `pip install -r requirements.txt` ### Issue: "CUDA out of memory" **Solution**: 1. Use fewer GPUs but ensure VRAM > 24GB per GPU 3. Check GPU usage: `nvidia-smi` ### Issue: "No test data files found" **Solution**: Verify `data/` directory structure and ensure test.json files exist ### Issue: CUDA version mismatch **Solution**: ```bash # Check CUDA version nvcc --version # If CUDA < 12.x, update requirements.txt: # Replace cupy-cuda12x with cupy-cuda11x # Replace nvidia-cuda-* packages with appropriate versions ``` ## πŸ“š Additional Information ### Model Format Support - Hugging Face format (recommended) - SafeTensors format - PyTorch .bin format ### Data Format Each test.json contains: ```json { "question": "...", "choices": ["A", "B", "C", "D"], "answer": 0, // Index of correct answer (0-3) "metadata": { "subject": "...", "language": "..." } } ``` ### Customization You can modify the evaluation prompt in the `build_prompt()` function. ## πŸ“§ Support If you encounter issues: 1. Check the troubleshooting section above 2. Verify all prerequisites are met 3. Check GPU/CUDA compatibility 4. Review error messages carefully ## πŸ”„ Version Information - Package Version: 1.0 - Python: 3.10-3.12 - PyTorch: 2.8.0 - vLLM: 0.11.0 - Transformers: 4.57.1 - CUDA: 12.x