Instructions to use Mungert/Eagle2-2B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Mungert/Eagle2-2B-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Mungert/Eagle2-2B-GGUF") 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 AutoModel model = AutoModel.from_pretrained("Mungert/Eagle2-2B-GGUF", dtype="auto") - llama-cpp-python
How to use Mungert/Eagle2-2B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Mungert/Eagle2-2B-GGUF", filename="Eagle2-2B-bf16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Mungert/Eagle2-2B-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Mungert/Eagle2-2B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Mungert/Eagle2-2B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Mungert/Eagle2-2B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Mungert/Eagle2-2B-GGUF: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 Mungert/Eagle2-2B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Mungert/Eagle2-2B-GGUF: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 Mungert/Eagle2-2B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Mungert/Eagle2-2B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/Mungert/Eagle2-2B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Mungert/Eagle2-2B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Mungert/Eagle2-2B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Mungert/Eagle2-2B-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/Mungert/Eagle2-2B-GGUF:Q4_K_M
- SGLang
How to use Mungert/Eagle2-2B-GGUF 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 "Mungert/Eagle2-2B-GGUF" \ --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": "Mungert/Eagle2-2B-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "Mungert/Eagle2-2B-GGUF" \ --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": "Mungert/Eagle2-2B-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Ollama
How to use Mungert/Eagle2-2B-GGUF with Ollama:
ollama run hf.co/Mungert/Eagle2-2B-GGUF:Q4_K_M
- Unsloth Studio
How to use Mungert/Eagle2-2B-GGUF 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 Mungert/Eagle2-2B-GGUF 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 Mungert/Eagle2-2B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Mungert/Eagle2-2B-GGUF to start chatting
- Pi
How to use Mungert/Eagle2-2B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Mungert/Eagle2-2B-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Mungert/Eagle2-2B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Mungert/Eagle2-2B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Mungert/Eagle2-2B-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Mungert/Eagle2-2B-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use Mungert/Eagle2-2B-GGUF with Docker Model Runner:
docker model run hf.co/Mungert/Eagle2-2B-GGUF:Q4_K_M
- Lemonade
How to use Mungert/Eagle2-2B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Mungert/Eagle2-2B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Eagle2-2B-GGUF-Q4_K_M
List all available models
lemonade list
Commit ·
10b770a
verified ·
0
Parent(s):
Super-squash history to reclaim storage
Browse files- .gitattributes +70 -0
- Eagle2-2B-bf16.gguf +3 -0
- Eagle2-2B-bf16_q8_0.gguf +3 -0
- Eagle2-2B-f16_q8_0.gguf +3 -0
- Eagle2-2B-iq3_m.gguf +3 -0
- Eagle2-2B-iq3_s.gguf +3 -0
- Eagle2-2B-iq3_xs.gguf +3 -0
- Eagle2-2B-iq3_xxs.gguf +3 -0
- Eagle2-2B-iq4_nl.gguf +3 -0
- Eagle2-2B-iq4_xs.gguf +3 -0
- Eagle2-2B-q3_k_m.gguf +3 -0
- Eagle2-2B-q3_k_s.gguf +3 -0
- Eagle2-2B-q4_0.gguf +3 -0
- Eagle2-2B-q4_1.gguf +3 -0
- Eagle2-2B-q4_k_m.gguf +3 -0
- Eagle2-2B-q4_k_s.gguf +3 -0
- Eagle2-2B-q5_0.gguf +3 -0
- Eagle2-2B-q5_1.gguf +3 -0
- Eagle2-2B-q5_k_m.gguf +3 -0
- Eagle2-2B-q5_k_s.gguf +3 -0
- Eagle2-2B-q6_k_m.gguf +3 -0
- Eagle2-2B-q8_0.gguf +3 -0
- Eagle2-2B.imatrix +3 -0
- README.md +465 -0
.gitattributes
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
Eagle2-2B-f16.gguf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
Eagle2-2B-f16_q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
Eagle2-2B-bf16_q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
Eagle2-2B-f16_q6_k.gguf filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
Eagle2-2B-bf16_q6_k.gguf filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
Eagle2-2B-f16_q4_k.gguf filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
Eagle2-2B-bf16_q4_k.gguf filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
Eagle2-2B-q3_k_l.gguf filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
Eagle2-2B-q4_k_l.gguf filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
Eagle2-2B-q5_k_l.gguf filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
Eagle2-2B-q6_k_l.gguf filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
Eagle2-2B-q3_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
Eagle2-2B-q3_k_s.gguf filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
Eagle2-2B-q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
Eagle2-2B-q4_k_s.gguf filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
Eagle2-2B-q5_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
Eagle2-2B-q5_k_s.gguf filter=lfs diff=lfs merge=lfs -text
|
| 53 |
+
Eagle2-2B-q6_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 54 |
+
Eagle2-2B-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
| 55 |
+
Eagle2-2B-q4_0.gguf filter=lfs diff=lfs merge=lfs -text
|
| 56 |
+
Eagle2-2B-q4_1.gguf filter=lfs diff=lfs merge=lfs -text
|
| 57 |
+
Eagle2-2B-q4_0_l.gguf filter=lfs diff=lfs merge=lfs -text
|
| 58 |
+
Eagle2-2B-q4_1_l.gguf filter=lfs diff=lfs merge=lfs -text
|
| 59 |
+
Eagle2-2B-q5_0.gguf filter=lfs diff=lfs merge=lfs -text
|
| 60 |
+
Eagle2-2B-q5_1.gguf filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
Eagle2-2B-q5_0_l.gguf filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
Eagle2-2B-q5_1_l.gguf filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
Eagle2-2B-iq3_xs.gguf filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
Eagle2-2B-iq3_xxs.gguf filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
Eagle2-2B-iq3_s.gguf filter=lfs diff=lfs merge=lfs -text
|
| 66 |
+
Eagle2-2B-iq3_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 67 |
+
Eagle2-2B-iq4_xs.gguf filter=lfs diff=lfs merge=lfs -text
|
| 68 |
+
Eagle2-2B-iq4_nl.gguf filter=lfs diff=lfs merge=lfs -text
|
| 69 |
+
Eagle2-2B.imatrix filter=lfs diff=lfs merge=lfs -text
|
| 70 |
+
Eagle2-2B-bf16.gguf filter=lfs diff=lfs merge=lfs -text
|
Eagle2-2B-bf16.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f6ef6917c6dcba2cef09cd0c97a9d880e86bd79b7f2a611d2d885e45832f44c7
|
| 3 |
+
size 3558799392
|
Eagle2-2B-bf16_q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9ddd81b90dcdf1b8d4c7d290c67737207aed33fa7bdac8b11bd315d48c8883a5
|
| 3 |
+
size 2764011552
|
Eagle2-2B-f16_q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:05842f9450901b4ef50faed41eb8f6b752285db1e03b05d0c51be0dfaf378fe5
|
| 3 |
+
size 2764011552
|
Eagle2-2B-iq3_m.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7965880ce571db3d536a0ae807f92d9fa6a66092e1753ee2c9390a2d9daf5c18
|
| 3 |
+
size 934180800
|
Eagle2-2B-iq3_s.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:56b85c007b0b77216883507ab159011ba449f0802025e1fbcee688ea921e2942
|
| 3 |
+
size 934180800
|
Eagle2-2B-iq3_xs.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:30c3c308fc9a85f66ff0457a5584ecdf679f088d22f960e1654e584493ca8949
|
| 3 |
+
size 867751872
|
Eagle2-2B-iq3_xxs.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:67e389901d3a56f186157d82561868c5a1b0a93589fb6b244c27c2c1dbf55e34
|
| 3 |
+
size 853903296
|
Eagle2-2B-iq4_nl.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5b7b7e1b076a0b6fdab702539cf85a9885073ca106e24ff0c6989345541ab0e0
|
| 3 |
+
size 1067040128
|
Eagle2-2B-iq4_xs.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:87237b310984967797694829afef59a561eedbfcde67cc4e9fc53ae308a4f425
|
| 3 |
+
size 1019160224
|
Eagle2-2B-q3_k_m.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5ecd9d58a92ab04171aa64ccd1f41cbfe182e198b91ad21571d067ccb78676f7
|
| 3 |
+
size 1011509824
|
Eagle2-2B-q3_k_s.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b9b310a164c606a774a03b9d005d9c1976531a609c1e0649c7d49234c952f355
|
| 3 |
+
size 949626816
|
Eagle2-2B-q4_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b7829f1ffd85f3dc81dc6bbe7c5b1ac5cf920afa411a08b74e41a556281c7b20
|
| 3 |
+
size 1005600960
|
Eagle2-2B-q4_1.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3573ab4f763a331a913daaf69537b265bf1b2a1a532d8791b233e38c93a15762
|
| 3 |
+
size 1116609600
|
Eagle2-2B-q4_k_m.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:38d02655e91dd0582faedfc04b4b580a361d819cc90cab88fee8c394c2273f9d
|
| 3 |
+
size 1167309376
|
Eagle2-2B-q4_k_s.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:31f02fbc5ffe5542fee76a16360f1a2d9ed545e057f062982e2e6a43192cbb7e
|
| 3 |
+
size 1138162240
|
Eagle2-2B-q5_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:783c6bd1bc230665baa40ef7bd881564b02e8320f6daec6868152eb25ffe345c
|
| 3 |
+
size 1227618240
|
Eagle2-2B-q5_1.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3e5014131bb512ffca7e17633321a31d746ee46b9de741e717f1dfb486c453fd
|
| 3 |
+
size 1338626880
|
Eagle2-2B-q5_k_m.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:664c7ba7d30d6b18d9c68fa4fd7463ca4a09775b1fb42ec1296bb683c05253c5
|
| 3 |
+
size 1317702208
|
Eagle2-2B-q5_k_s.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ac1cfc6c2be06fdf233fd9ce642b12de64175ec3765f51f872496795b71e78a2
|
| 3 |
+
size 1302661696
|
Eagle2-2B-q6_k_m.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dcec9e2e856eb186928840ee58fb4eef100740a7ceabf4234d2e602faf781940
|
| 3 |
+
size 1463511616
|
Eagle2-2B-q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d5de7c7b4dec5d2b09da09721618a921fc05d96d10dd92ff4e1fd939e379dc55
|
| 3 |
+
size 1893669792
|
Eagle2-2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_model:
|
| 6 |
+
- google/paligemma-3b-mix-448
|
| 7 |
+
- Qwen/Qwen2.5-1.5B-Instruct
|
| 8 |
+
- google/siglip-so400m-patch14-384
|
| 9 |
+
base_model_relation: merge
|
| 10 |
+
language:
|
| 11 |
+
- multilingual
|
| 12 |
+
tags:
|
| 13 |
+
- eagle
|
| 14 |
+
- VLM
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# <span style="color: #7FFF7F;">Eagle2-2B GGUF Models</span>
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
## <span style="color: #7F7FFF;">Model Generation Details</span>
|
| 21 |
+
|
| 22 |
+
This model was generated using [llama.cpp](https://github.com/ggerganov/llama.cpp) at commit [`b9c3eefd`](https://github.com/ggerganov/llama.cpp/commit/b9c3eefde1b67104bd993485ff38dd62abe9d70c).
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
---
|
| 30 |
+
|
| 31 |
+
<a href="https://readyforquantum.com/huggingface_gguf_selection_guide.html" style="color: #7FFF7F;">
|
| 32 |
+
Click here to get info on choosing the right GGUF model format
|
| 33 |
+
</a>
|
| 34 |
+
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
<!--Begin Original Model Card-->
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
# Eagle-2
|
| 44 |
+
|
| 45 |
+
[\[📂 GitHub\]](https://github.com/NVlabs/EAGLE) [\[📜 Eagle2 Tech Report\]](http://arxiv.org/abs/2501.14818)
|
| 46 |
+
[\[🤗 HF Demo\]](https://huggingface.co/spaces/nvidia/Eagle2-Demo)
|
| 47 |
+
|
| 48 |
+
# News:
|
| 49 |
+
- We update the model arch to `eagle_2_5_vl` to support `generate` feature.
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
## Introduction
|
| 53 |
+
|
| 54 |
+
We are thrilled to release our latest Eagle2 series Vision-Language Model. Open-source Vision-Language Models (VLMs) have made significant strides in narrowing the gap with proprietary models. However, critical details about data strategies and implementation are often missing, limiting reproducibility and innovation. In this project, we focus on VLM post-training from a data-centric perspective, sharing insights into building effective data strategies from scratch. By combining these strategies with robust training recipes and model design, we introduce Eagle2, a family of performant VLMs. Our work aims to empower the open-source community to develop competitive VLMs with transparent processes.
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
In this repo, we are open-sourcing Eagle2-2B, a lightweight model that achieves remarkable efficiency and speed while maintaining solid performance.
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
## Model Zoo
|
| 68 |
+
We provide the following models:
|
| 69 |
+
|
| 70 |
+
| model name | LLM | Vision | Max Length| HF Link|
|
| 71 |
+
| ----------- | ------- |---------|-|-|
|
| 72 |
+
| Eagle2-1B | [Qwen2.5-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct) | Siglip | 16K| [🤗 link](https://huggingface.co/NVIDIA/Eagle2-1B)|
|
| 73 |
+
| Eagle2-2B | [Qwen2.5-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct) | Siglip | 16K| [🤗 link](https://huggingface.co/NVIDIA/Eagle2-2B)|
|
| 74 |
+
| Eagle2-9B | [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) | Siglip+ConvNext | 16K| [🤗 link](https://huggingface.co/NVIDIA/Eagle2-9B)|
|
| 75 |
+
|
| 76 |
+
## Benchmark Results
|
| 77 |
+
| Benchmark | InternVL2-2B | InternVL2.5-2B | InternVL2-4B |Qwen2-VL-2B| Eagle2-2B|
|
| 78 |
+
| :--------------------------: | :------------------: | :----------------: | :----------: |:----------: |:----------: |
|
| 79 |
+
| DocVQA<sub>test</sub> | 86.9 | 88.7 | 89.2 |90.1|88.0|
|
| 80 |
+
| ChartQA<sub>test</sub> | 76.2 | 79.2 | 81.5 |73.0|82.0|
|
| 81 |
+
| InfoVQA<sub>test</sub> | 58.9 | 60.9 | 67.0 |65.5|65.8|
|
| 82 |
+
| TextVQA<sub>val</sub> | 73.4 | 74.3 | 74.4 |79.7|79.1|
|
| 83 |
+
| OCRBench | 784 | 804 | 788 |809|818|
|
| 84 |
+
| MME<sub>sum</sub> | 1876.8 | 2138.2 | 2059.8 |1872.0 | 2109.8
|
| 85 |
+
| RealWorldQA | 57.3 | 60.1 | 60.7 |62.6|63.1|
|
| 86 |
+
| AI2D<sub>test</sub> | 74.1 | 74.9 | 74.7 | 78.9 |79.3|
|
| 87 |
+
| MMMU<sub>val</sub> | 36.3 | 43.6 | 47.9 |41.1|43.1|
|
| 88 |
+
| MMVet<sub>GPT-4-Turbo</sub> | 39.5 | 60.8 | 51.0 | 49.5|53.8|
|
| 89 |
+
| HallBench<sub>avg</sub> | 37.9 | 42.6 | 41.9 |41.7|45.8
|
| 90 |
+
| MathVista<sub>testmini</sub> | 46.3 | 51.3 | 58.6 |43.0|54.7|
|
| 91 |
+
| MMstar | 50.1 | 53.7 | 54.3|48.0|56.4|
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
## Quick Start
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
We provide a [inference script](./demo.py) to help you quickly start using the model. We support different input types:
|
| 100 |
+
- pure text input
|
| 101 |
+
- single image input
|
| 102 |
+
- multiple image input
|
| 103 |
+
- video input
|
| 104 |
+
|
| 105 |
+
### Install the dependencies
|
| 106 |
+
|
| 107 |
+
```bash
|
| 108 |
+
pip install transformers
|
| 109 |
+
pip install flash-attn
|
| 110 |
+
```
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
### single image
|
| 114 |
+
|
| 115 |
+
```python
|
| 116 |
+
from PIL import Image
|
| 117 |
+
import requests
|
| 118 |
+
from transformers import AutoProcessor, AutoModel
|
| 119 |
+
import torch
|
| 120 |
+
model = AutoModel.from_pretrained("nvidia/Eagle2-1B",trust_remote_code=True, torch_dtype=torch.bfloat16)
|
| 121 |
+
processor = AutoProcessor.from_pretrained("nvidia/Eagle2-1B", trust_remote_code=True, use_fast=True)
|
| 122 |
+
processor.tokenizer.padding_side = "left"
|
| 123 |
+
|
| 124 |
+
messages = [
|
| 125 |
+
{
|
| 126 |
+
"role": "user",
|
| 127 |
+
"content": [
|
| 128 |
+
{
|
| 129 |
+
"type": "image",
|
| 130 |
+
"image": "https://www.ilankelman.org/stopsigns/australia.jpg",
|
| 131 |
+
},
|
| 132 |
+
{"type": "text", "text": "Describe this image."},
|
| 133 |
+
],
|
| 134 |
+
}
|
| 135 |
+
]
|
| 136 |
+
|
| 137 |
+
text_list = [processor.apply_chat_template(
|
| 138 |
+
messages, tokenize=False, add_generation_prompt=True
|
| 139 |
+
)]
|
| 140 |
+
image_inputs, video_inputs = processor.process_vision_info(messages)
|
| 141 |
+
inputs = processor(text = text_list, images=image_inputs, videos=video_inputs, return_tensors="pt", padding=True)
|
| 142 |
+
inputs = inputs.to("cuda")
|
| 143 |
+
model = model.to("cuda")
|
| 144 |
+
generated_ids = model.generate(**inputs, max_new_tokens=1024)
|
| 145 |
+
output_text = processor.batch_decode(
|
| 146 |
+
generated_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False
|
| 147 |
+
)
|
| 148 |
+
print(output_text)
|
| 149 |
+
```
|
| 150 |
+
|
| 151 |
+
### stream generation
|
| 152 |
+
|
| 153 |
+
```python
|
| 154 |
+
from PIL import Image
|
| 155 |
+
import requests
|
| 156 |
+
from transformers import AutoProcessor, AutoModel, AutoTokenizer
|
| 157 |
+
import torch
|
| 158 |
+
|
| 159 |
+
from transformers import TextIteratorStreamer
|
| 160 |
+
import threading
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
model = AutoModel.from_pretrained("nvidia/Eagle2-1B",trust_remote_code=True, attn_implementation='flash_attention_2', torch_dtype=torch.bfloat16)
|
| 164 |
+
tokenizer = AutoTokenizer.from_pretrained("nvidia/Eagle2-1B", trust_remote_code=True, use_fast=True)
|
| 165 |
+
processor = AutoProcessor.from_pretrained("nvidia/Eagle2-1B", trust_remote_code=True, use_fast=True)
|
| 166 |
+
processor.tokenizer.padding_side = "left"
|
| 167 |
+
|
| 168 |
+
messages = [
|
| 169 |
+
{
|
| 170 |
+
"role": "user",
|
| 171 |
+
"content": [
|
| 172 |
+
{
|
| 173 |
+
"type": "image",
|
| 174 |
+
"image": "https://www.ilankelman.org/stopsigns/australia.jpg",
|
| 175 |
+
},
|
| 176 |
+
{"type": "text", "text": "Describe this image."},
|
| 177 |
+
],
|
| 178 |
+
}
|
| 179 |
+
]
|
| 180 |
+
|
| 181 |
+
text_list = [processor.apply_chat_template(
|
| 182 |
+
messages, tokenize=False, add_generation_prompt=True
|
| 183 |
+
)]
|
| 184 |
+
image_inputs, video_inputs = processor.process_vision_info(messages)
|
| 185 |
+
inputs = processor(text = text_list, images=image_inputs, videos=video_inputs, return_tensors="pt", padding=True)
|
| 186 |
+
inputs = inputs.to("cuda")
|
| 187 |
+
model = model.to("cuda")
|
| 188 |
+
|
| 189 |
+
streamer = TextIteratorStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
|
| 190 |
+
|
| 191 |
+
generation_kwargs = dict(
|
| 192 |
+
**inputs,
|
| 193 |
+
streamer=streamer,
|
| 194 |
+
max_new_tokens=1024,
|
| 195 |
+
do_sample=True,
|
| 196 |
+
top_p=0.95,
|
| 197 |
+
temperature=0.8
|
| 198 |
+
)
|
| 199 |
+
thread = threading.Thread(target=model.generate, kwargs=generation_kwargs)
|
| 200 |
+
thread.start()
|
| 201 |
+
|
| 202 |
+
|
| 203 |
+
for new_text in streamer:
|
| 204 |
+
print(new_text, end="", flush=True)
|
| 205 |
+
```
|
| 206 |
+
|
| 207 |
+
### multiple-images
|
| 208 |
+
|
| 209 |
+
```python
|
| 210 |
+
from PIL import Image
|
| 211 |
+
import requests
|
| 212 |
+
from transformers import AutoProcessor, AutoModel
|
| 213 |
+
import torch
|
| 214 |
+
model = AutoModel.from_pretrained("nvidia/Eagle2-1B",trust_remote_code=True, torch_dtype=torch.bfloat16)
|
| 215 |
+
processor = AutoProcessor.from_pretrained("nvidia/Eagle2-1B", trust_remote_code=True, use_fast=True)
|
| 216 |
+
processor.tokenizer.padding_side = "left"
|
| 217 |
+
|
| 218 |
+
messages = [
|
| 219 |
+
{
|
| 220 |
+
"role": "user",
|
| 221 |
+
"content": [
|
| 222 |
+
{
|
| 223 |
+
"type": "image",
|
| 224 |
+
"image": "https://www.ilankelman.org/stopsigns/australia.jpg",
|
| 225 |
+
},
|
| 226 |
+
{
|
| 227 |
+
"type": "image",
|
| 228 |
+
"image": "https://www.nvidia.com/content/dam/en-zz/Solutions/about-nvidia/logo-and-brand/01-nvidia-logo-vert-500x200-2c50-d@2x.png",
|
| 229 |
+
},
|
| 230 |
+
{"type": "text", "text": "Describe these two images."},
|
| 231 |
+
],
|
| 232 |
+
}
|
| 233 |
+
]
|
| 234 |
+
|
| 235 |
+
text_list = [processor.apply_chat_template(
|
| 236 |
+
messages, tokenize=False, add_generation_prompt=True
|
| 237 |
+
)]
|
| 238 |
+
image_inputs, video_inputs = processor.process_vision_info(messages)
|
| 239 |
+
inputs = processor(text = text_list, images=image_inputs, videos=video_inputs, return_tensors="pt", padding=True)
|
| 240 |
+
inputs = inputs.to("cuda")
|
| 241 |
+
model = model.to("cuda")
|
| 242 |
+
generated_ids = model.generate(**inputs, max_new_tokens=1024)
|
| 243 |
+
output_text = processor.batch_decode(
|
| 244 |
+
generated_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False
|
| 245 |
+
)
|
| 246 |
+
print(output_text)
|
| 247 |
+
```
|
| 248 |
+
|
| 249 |
+
### single video
|
| 250 |
+
|
| 251 |
+
```python
|
| 252 |
+
|
| 253 |
+
from PIL import Image
|
| 254 |
+
import requests
|
| 255 |
+
from transformers import AutoProcessor, AutoModel
|
| 256 |
+
import torch
|
| 257 |
+
model = AutoModel.from_pretrained("nvidia/Eagle2-1B",trust_remote_code=True, torch_dtype=torch.bfloat16)
|
| 258 |
+
processor = AutoProcessor.from_pretrained("nvidia/Eagle2-1B", trust_remote_code=True, use_fast=True)
|
| 259 |
+
processor.tokenizer.padding_side = "left"
|
| 260 |
+
|
| 261 |
+
messages = [
|
| 262 |
+
{
|
| 263 |
+
"role": "user",
|
| 264 |
+
"content": [
|
| 265 |
+
{
|
| 266 |
+
"type": "video",
|
| 267 |
+
"video": "../Eagle2-8B/space_woaudio.mp4",
|
| 268 |
+
},
|
| 269 |
+
{"type": "text", "text": "Describe this video."},
|
| 270 |
+
],
|
| 271 |
+
}
|
| 272 |
+
]
|
| 273 |
+
|
| 274 |
+
text_list = [processor.apply_chat_template(
|
| 275 |
+
messages, tokenize=False, add_generation_prompt=True
|
| 276 |
+
)]
|
| 277 |
+
image_inputs, video_inputs, video_kwargs = processor.process_vision_info(messages, return_video_kwargs=True)
|
| 278 |
+
|
| 279 |
+
inputs = processor(text = text_list, images=image_inputs, videos=video_inputs, return_tensors="pt", padding=True, videos_kwargs=video_kwargs)
|
| 280 |
+
inputs = inputs.to("cuda")
|
| 281 |
+
model = model.to("cuda")
|
| 282 |
+
generated_ids = model.generate(**inputs, max_new_tokens=1024)
|
| 283 |
+
output_text = processor.batch_decode(
|
| 284 |
+
generated_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False
|
| 285 |
+
)
|
| 286 |
+
print(output_text)
|
| 287 |
+
|
| 288 |
+
```
|
| 289 |
+
|
| 290 |
+
### multieple videos
|
| 291 |
+
|
| 292 |
+
```python
|
| 293 |
+
from PIL import Image
|
| 294 |
+
import requests
|
| 295 |
+
from transformers import AutoProcessor, AutoModel
|
| 296 |
+
import torch
|
| 297 |
+
model = AutoModel.from_pretrained("nvidia/Eagle2-1B",trust_remote_code=True, torch_dtype=torch.bfloat16)
|
| 298 |
+
processor = AutoProcessor.from_pretrained("nvidia/Eagle2-1B", trust_remote_code=True, use_fast=True)
|
| 299 |
+
processor.tokenizer.padding_side = "left"
|
| 300 |
+
|
| 301 |
+
messages = [
|
| 302 |
+
{
|
| 303 |
+
"role": "user",
|
| 304 |
+
"content": [
|
| 305 |
+
{
|
| 306 |
+
"type": "video",
|
| 307 |
+
"video": "../Eagle2-8B/space_woaudio.mp4",
|
| 308 |
+
"nframes": 10,
|
| 309 |
+
},
|
| 310 |
+
{
|
| 311 |
+
"type": "video",
|
| 312 |
+
"video": "../Eagle2-8B/video_ocr.mp4",
|
| 313 |
+
"nframes": 10,
|
| 314 |
+
},
|
| 315 |
+
{"type": "text", "text": "Describe these two videos respectively."},
|
| 316 |
+
],
|
| 317 |
+
}
|
| 318 |
+
]
|
| 319 |
+
|
| 320 |
+
text_list = [processor.apply_chat_template(
|
| 321 |
+
messages, tokenize=False, add_generation_prompt=True
|
| 322 |
+
)]
|
| 323 |
+
image_inputs, video_inputs, video_kwargs = processor.process_vision_info(messages, return_video_kwargs=True)
|
| 324 |
+
inputs = processor(text = text_list, images=image_inputs, videos=video_inputs, return_tensors="pt", padding=True, videos_kwargs=video_kwargs)
|
| 325 |
+
inputs = inputs.to("cuda")
|
| 326 |
+
model = model.to("cuda")
|
| 327 |
+
generated_ids = model.generate(**inputs, max_new_tokens=1024)
|
| 328 |
+
output_text = processor.batch_decode(
|
| 329 |
+
generated_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False
|
| 330 |
+
)
|
| 331 |
+
print(output_text)
|
| 332 |
+
```
|
| 333 |
+
|
| 334 |
+
### batch inference
|
| 335 |
+
|
| 336 |
+
```python
|
| 337 |
+
from PIL import Image
|
| 338 |
+
import requests
|
| 339 |
+
from transformers import AutoProcessor, AutoModel
|
| 340 |
+
import torch
|
| 341 |
+
model = AutoModel.from_pretrained("nvidia/Eagle2-1B",trust_remote_code=True, torch_dtype=torch.bfloat16)
|
| 342 |
+
processor = AutoProcessor.from_pretrained("nvidia/Eagle2-1B", trust_remote_code=True, use_fast=True)
|
| 343 |
+
processor.tokenizer.padding_side = "left"
|
| 344 |
+
|
| 345 |
+
messages1 = [
|
| 346 |
+
{
|
| 347 |
+
"role": "user",
|
| 348 |
+
"content": [
|
| 349 |
+
{
|
| 350 |
+
"type": "image",
|
| 351 |
+
"image": "https://www.ilankelman.org/stopsigns/australia.jpg",
|
| 352 |
+
},
|
| 353 |
+
{"type": "text", "text": "Describe this image."},
|
| 354 |
+
],
|
| 355 |
+
}
|
| 356 |
+
]
|
| 357 |
+
|
| 358 |
+
messages2 = [
|
| 359 |
+
{
|
| 360 |
+
"role": "user",
|
| 361 |
+
"content": [
|
| 362 |
+
{
|
| 363 |
+
"type": "image",
|
| 364 |
+
"image": "https://www.nvidia.com/content/dam/en-zz/Solutions/about-nvidia/logo-and-brand/01-nvidia-logo-vert-500x200-2c50-d@2x.png",
|
| 365 |
+
},
|
| 366 |
+
{"type": "text", "text": "Describe this image."},
|
| 367 |
+
],
|
| 368 |
+
}
|
| 369 |
+
]
|
| 370 |
+
|
| 371 |
+
text_list = [processor.apply_chat_template(
|
| 372 |
+
messages, tokenize=False, add_generation_prompt=True
|
| 373 |
+
) for messages in [messages1, messages2]]
|
| 374 |
+
image_inputs, video_inputs = processor.process_vision_info([messages1, messages2])
|
| 375 |
+
inputs = processor(text = text_list, images=image_inputs, videos=video_inputs, return_tensors="pt", padding=True)
|
| 376 |
+
inputs = inputs.to("cuda")
|
| 377 |
+
model = model.to("cuda")
|
| 378 |
+
generated_ids = model.generate(**inputs, max_new_tokens=1024)
|
| 379 |
+
output_text = processor.batch_decode(
|
| 380 |
+
generated_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False
|
| 381 |
+
)
|
| 382 |
+
print(output_text)
|
| 383 |
+
```
|
| 384 |
+
|
| 385 |
+
## TODO
|
| 386 |
+
- [ ] Support vLLM Inference
|
| 387 |
+
- [ ] Provide AWQ Quantization Weights
|
| 388 |
+
- [ ] Provide fine-tuning scripts
|
| 389 |
+
|
| 390 |
+
|
| 391 |
+
## License/Terms of Use
|
| 392 |
+
- The code is released under the Apache 2.0 license as found in the [LICENSE](https://huggingface.co/NVEagle/Eagle-X5-13B-Chat/blob/main/LICENSE) file.
|
| 393 |
+
- The pretrained model weights are released under the [Creative Commons Attribution: Non-Commercial 4.0 International](https://spdx.org/licenses/CC-BY-NC-4.0) <br>
|
| 394 |
+
- The service is a research preview intended for non-commercial use only, and is subject to the following licenses and terms:
|
| 395 |
+
- Model License of Qwen2.5-1.5B-Instruct: [Apache-2.0](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct/blob/main/LICENSE)
|
| 396 |
+
- Model License of PaliGemma: [Gemma license](https://ai.google.dev/gemma/terms)
|
| 397 |
+
|
| 398 |
+
|
| 399 |
+
|
| 400 |
+
## Citation
|
| 401 |
+
|
| 402 |
+
## Ethical Considerations
|
| 403 |
+
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse.
|
| 404 |
+
|
| 405 |
+
Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
|
| 406 |
+
|
| 407 |
+
|
| 408 |
+
<!--End Original Model Card-->
|
| 409 |
+
|
| 410 |
+
---
|
| 411 |
+
|
| 412 |
+
# <span id="testllm" style="color: #7F7FFF;">🚀 If you find these models useful</span>
|
| 413 |
+
|
| 414 |
+
Help me test my **AI-Powered Quantum Network Monitor Assistant** with **quantum-ready security checks**:
|
| 415 |
+
|
| 416 |
+
👉 [Quantum Network Monitor](https://readyforquantum.com/?assistant=open&utm_source=huggingface&utm_medium=referral&utm_campaign=huggingface_repo_readme)
|
| 417 |
+
|
| 418 |
+
|
| 419 |
+
The full Open Source Code for the Quantum Network Monitor Service available at my github repos ( repos with NetworkMonitor in the name) : [Source Code Quantum Network Monitor](https://github.com/Mungert69). You will also find the code I use to quantize the models if you want to do it yourself [GGUFModelBuilder](https://github.com/Mungert69/GGUFModelBuilder)
|
| 420 |
+
|
| 421 |
+
💬 **How to test**:
|
| 422 |
+
Choose an **AI assistant type**:
|
| 423 |
+
- `TurboLLM` (GPT-4.1-mini)
|
| 424 |
+
- `HugLLM` (Hugginface Open-source models)
|
| 425 |
+
- `TestLLM` (Experimental CPU-only)
|
| 426 |
+
|
| 427 |
+
### **What I’m Testing**
|
| 428 |
+
I’m pushing the limits of **small open-source models for AI network monitoring**, specifically:
|
| 429 |
+
- **Function calling** against live network services
|
| 430 |
+
- **How small can a model go** while still handling:
|
| 431 |
+
- Automated **Nmap security scans**
|
| 432 |
+
- **Quantum-readiness checks**
|
| 433 |
+
- **Network Monitoring tasks**
|
| 434 |
+
|
| 435 |
+
🟡 **TestLLM** – Current experimental model (llama.cpp on 2 CPU threads on huggingface docker space):
|
| 436 |
+
- ✅ **Zero-configuration setup**
|
| 437 |
+
- ⏳ 30s load time (slow inference but **no API costs**) . No token limited as the cost is low.
|
| 438 |
+
- 🔧 **Help wanted!** If you’re into **edge-device AI**, let’s collaborate!
|
| 439 |
+
|
| 440 |
+
### **Other Assistants**
|
| 441 |
+
🟢 **TurboLLM** – Uses **gpt-4.1-mini** :
|
| 442 |
+
- **It performs very well but unfortunatly OpenAI charges per token. For this reason tokens usage is limited.
|
| 443 |
+
- **Create custom cmd processors to run .net code on Quantum Network Monitor Agents**
|
| 444 |
+
- **Real-time network diagnostics and monitoring**
|
| 445 |
+
- **Security Audits**
|
| 446 |
+
- **Penetration testing** (Nmap/Metasploit)
|
| 447 |
+
|
| 448 |
+
🔵 **HugLLM** – Latest Open-source models:
|
| 449 |
+
- 🌐 Runs on Hugging Face Inference API. Performs pretty well using the lastest models hosted on Novita.
|
| 450 |
+
|
| 451 |
+
### 💡 **Example commands you could test**:
|
| 452 |
+
1. `"Give me info on my websites SSL certificate"`
|
| 453 |
+
2. `"Check if my server is using quantum safe encyption for communication"`
|
| 454 |
+
3. `"Run a comprehensive security audit on my server"`
|
| 455 |
+
4. '"Create a cmd processor to .. (what ever you want)" Note you need to install a [Quantum Network Monitor Agent](https://readyforquantum.com/Download/?utm_source=huggingface&utm_medium=referral&utm_campaign=huggingface_repo_readme) to run the .net code on. This is a very flexible and powerful feature. Use with caution!
|
| 456 |
+
|
| 457 |
+
### Final Word
|
| 458 |
+
|
| 459 |
+
I fund the servers used to create these model files, run the Quantum Network Monitor service, and pay for inference from Novita and OpenAI—all out of my own pocket. All the code behind the model creation and the Quantum Network Monitor project is [open source](https://github.com/Mungert69). Feel free to use whatever you find helpful.
|
| 460 |
+
|
| 461 |
+
If you appreciate the work, please consider [buying me a coffee](https://www.buymeacoffee.com/mahadeva) ☕. Your support helps cover service costs and allows me to raise token limits for everyone.
|
| 462 |
+
|
| 463 |
+
I'm also open to job opportunities or sponsorship.
|
| 464 |
+
|
| 465 |
+
Thank you! 😊
|