Text Generation
Transformers
Safetensors
GGUF
English
gpt2
chatbot
lora
instruction-tuned
distilled
microllm2
conversational
text-generation-inference
Instructions to use MLVXN/MicroLLM2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MLVXN/MicroLLM2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MLVXN/MicroLLM2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MLVXN/MicroLLM2") model = AutoModelForCausalLM.from_pretrained("MLVXN/MicroLLM2", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use MLVXN/MicroLLM2 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf MLVXN/MicroLLM2:Q4_K_M # Run inference directly in the terminal: llama cli -hf MLVXN/MicroLLM2:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf MLVXN/MicroLLM2:Q4_K_M # Run inference directly in the terminal: llama cli -hf MLVXN/MicroLLM2:Q4_K_M
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 MLVXN/MicroLLM2:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf MLVXN/MicroLLM2:Q4_K_M
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 MLVXN/MicroLLM2:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf MLVXN/MicroLLM2:Q4_K_M
Use Docker
docker model run hf.co/MLVXN/MicroLLM2:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use MLVXN/MicroLLM2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MLVXN/MicroLLM2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MLVXN/MicroLLM2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MLVXN/MicroLLM2:Q4_K_M
- SGLang
How to use MLVXN/MicroLLM2 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 "MLVXN/MicroLLM2" \ --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": "MLVXN/MicroLLM2", "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 "MLVXN/MicroLLM2" \ --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": "MLVXN/MicroLLM2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use MLVXN/MicroLLM2 with Ollama:
ollama run hf.co/MLVXN/MicroLLM2:Q4_K_M
- Unsloth Studio
How to use MLVXN/MicroLLM2 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 MLVXN/MicroLLM2 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 MLVXN/MicroLLM2 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for MLVXN/MicroLLM2 to start chatting
- Docker Model Runner
How to use MLVXN/MicroLLM2 with Docker Model Runner:
docker model run hf.co/MLVXN/MicroLLM2:Q4_K_M
- Lemonade
How to use MLVXN/MicroLLM2 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull MLVXN/MicroLLM2:Q4_K_M
Run and chat with the model
lemonade run user.MicroLLM2-Q4_K_M
List all available models
lemonade list
- Atomic Chat
bench: add mmlu_results.json 27.59% 149/540
Browse files- mmlu_results.json +147 -0
mmlu_results.json
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "/home/zeus/microllm2/microllm2-checkpoints/final_merged",
|
| 3 |
+
"shots": 5,
|
| 4 |
+
"limit": 20,
|
| 5 |
+
"overall": {
|
| 6 |
+
"correct": 149,
|
| 7 |
+
"total": 540,
|
| 8 |
+
"accuracy": 0.2759259259259259
|
| 9 |
+
},
|
| 10 |
+
"subjects": {
|
| 11 |
+
"abstract_algebra": {
|
| 12 |
+
"correct": 6,
|
| 13 |
+
"total": 20,
|
| 14 |
+
"accuracy": 0.3
|
| 15 |
+
},
|
| 16 |
+
"anatomy": {
|
| 17 |
+
"correct": 5,
|
| 18 |
+
"total": 20,
|
| 19 |
+
"accuracy": 0.25
|
| 20 |
+
},
|
| 21 |
+
"astronomy": {
|
| 22 |
+
"correct": 7,
|
| 23 |
+
"total": 20,
|
| 24 |
+
"accuracy": 0.35
|
| 25 |
+
},
|
| 26 |
+
"business_ethics": {
|
| 27 |
+
"correct": 6,
|
| 28 |
+
"total": 20,
|
| 29 |
+
"accuracy": 0.3
|
| 30 |
+
},
|
| 31 |
+
"clinical_knowledge": {
|
| 32 |
+
"correct": 9,
|
| 33 |
+
"total": 20,
|
| 34 |
+
"accuracy": 0.45
|
| 35 |
+
},
|
| 36 |
+
"college_biology": {
|
| 37 |
+
"correct": 9,
|
| 38 |
+
"total": 20,
|
| 39 |
+
"accuracy": 0.45
|
| 40 |
+
},
|
| 41 |
+
"college_chemistry": {
|
| 42 |
+
"correct": 3,
|
| 43 |
+
"total": 20,
|
| 44 |
+
"accuracy": 0.15
|
| 45 |
+
},
|
| 46 |
+
"college_computer_science": {
|
| 47 |
+
"correct": 9,
|
| 48 |
+
"total": 20,
|
| 49 |
+
"accuracy": 0.45
|
| 50 |
+
},
|
| 51 |
+
"college_mathematics": {
|
| 52 |
+
"correct": 7,
|
| 53 |
+
"total": 20,
|
| 54 |
+
"accuracy": 0.35
|
| 55 |
+
},
|
| 56 |
+
"college_medicine": {
|
| 57 |
+
"correct": 6,
|
| 58 |
+
"total": 20,
|
| 59 |
+
"accuracy": 0.3
|
| 60 |
+
},
|
| 61 |
+
"college_physics": {
|
| 62 |
+
"correct": 3,
|
| 63 |
+
"total": 20,
|
| 64 |
+
"accuracy": 0.15
|
| 65 |
+
},
|
| 66 |
+
"computer_security": {
|
| 67 |
+
"correct": 6,
|
| 68 |
+
"total": 20,
|
| 69 |
+
"accuracy": 0.3
|
| 70 |
+
},
|
| 71 |
+
"conceptual_physics": {
|
| 72 |
+
"correct": 1,
|
| 73 |
+
"total": 20,
|
| 74 |
+
"accuracy": 0.05
|
| 75 |
+
},
|
| 76 |
+
"econometrics": {
|
| 77 |
+
"correct": 6,
|
| 78 |
+
"total": 20,
|
| 79 |
+
"accuracy": 0.3
|
| 80 |
+
},
|
| 81 |
+
"electrical_engineering": {
|
| 82 |
+
"correct": 4,
|
| 83 |
+
"total": 20,
|
| 84 |
+
"accuracy": 0.2
|
| 85 |
+
},
|
| 86 |
+
"elementary_mathematics": {
|
| 87 |
+
"correct": 6,
|
| 88 |
+
"total": 20,
|
| 89 |
+
"accuracy": 0.3
|
| 90 |
+
},
|
| 91 |
+
"formal_logic": {
|
| 92 |
+
"correct": 2,
|
| 93 |
+
"total": 20,
|
| 94 |
+
"accuracy": 0.1
|
| 95 |
+
},
|
| 96 |
+
"global_facts": {
|
| 97 |
+
"correct": 7,
|
| 98 |
+
"total": 20,
|
| 99 |
+
"accuracy": 0.35
|
| 100 |
+
},
|
| 101 |
+
"high_school_biology": {
|
| 102 |
+
"correct": 9,
|
| 103 |
+
"total": 20,
|
| 104 |
+
"accuracy": 0.45
|
| 105 |
+
},
|
| 106 |
+
"high_school_chemistry": {
|
| 107 |
+
"correct": 7,
|
| 108 |
+
"total": 20,
|
| 109 |
+
"accuracy": 0.35
|
| 110 |
+
},
|
| 111 |
+
"high_school_computer_science": {
|
| 112 |
+
"correct": 7,
|
| 113 |
+
"total": 20,
|
| 114 |
+
"accuracy": 0.35
|
| 115 |
+
},
|
| 116 |
+
"high_school_european_history": {
|
| 117 |
+
"correct": 4,
|
| 118 |
+
"total": 20,
|
| 119 |
+
"accuracy": 0.2
|
| 120 |
+
},
|
| 121 |
+
"high_school_geography": {
|
| 122 |
+
"correct": 5,
|
| 123 |
+
"total": 20,
|
| 124 |
+
"accuracy": 0.25
|
| 125 |
+
},
|
| 126 |
+
"high_school_government_and_politics": {
|
| 127 |
+
"correct": 4,
|
| 128 |
+
"total": 20,
|
| 129 |
+
"accuracy": 0.2
|
| 130 |
+
},
|
| 131 |
+
"high_school_macroeconomics": {
|
| 132 |
+
"correct": 0,
|
| 133 |
+
"total": 20,
|
| 134 |
+
"accuracy": 0.0
|
| 135 |
+
},
|
| 136 |
+
"high_school_mathematics": {
|
| 137 |
+
"correct": 4,
|
| 138 |
+
"total": 20,
|
| 139 |
+
"accuracy": 0.2
|
| 140 |
+
},
|
| 141 |
+
"high_school_microeconomics": {
|
| 142 |
+
"correct": 7,
|
| 143 |
+
"total": 20,
|
| 144 |
+
"accuracy": 0.35
|
| 145 |
+
}
|
| 146 |
+
}
|
| 147 |
+
}
|