| 772 | | Downloading bytes: | 0.00B Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads. | 0.00B / 175MB |
| 773 | | Fetching 19 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 19/19 [00:10<00:00, 1.85it/s] |
| 774 | | Download complete: : ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 522MB, 87.4MB/s Download complete: /usr/share/cnn/███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 746MB / 746MB, 135MB/s |
| 775 | | Download complete: : ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 522MB, 87.4MB/s |
| 776 | | Reconstruction complete: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 746MB / 746MB, 135MB/s |
| | 779 | Downloading bytes: | 0.00B Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads. |
| | 780 | Fetching 19 files: 100%|███████████████████████████████████████████████████████████████████████████████████████| 19/19 [00:11<00:00, 1.62it/s] |
| | 781 | Download complete: : ██████████████████████████████████████████████████████████████████████████████████████████████████████| 522MB, 90.7MB/s Download complete: /usr/share/cnn/█████████████████████████████████████████████████████████████████████████████████| 746MB / 746MB, 119MB/s |
| | 782 | Download complete: : ██████████████████████████████████████████████████████████████████████████████████████████████████████| 522MB, 90.7MB/s |
| | 783 | Reconstruction complete: 100%|████████████████████████████████████████████████████████████████████████████████████| 746MB / 746MB, 119MB/s |
| 952 | | Downloading bytes: | 0.00B Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads. | 0.00B / 0.00B |
| 953 | | Fetching 13 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 13/13 [02:04<00:00, 9.56s/it] |
| 954 | | Download complete: : ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7.78GB, 86.0MB/s Download complete: /usr/share/llm/Qwen2.5-7B-Instruct████████████████████████████████████████████████████████████████████████████████████████████████████████████| 8.17GB / 8.17GB, 74.4MB/s |
| 955 | | Download complete: : ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7.78GB, 86.0MB/s |
| 956 | | Reconstruction complete: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 8.17GB / 8.17GB, 74.4MB/s |
| | 959 | Downloading bytes: | 0.00B Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads. |
| | 960 | Fetching 13 files: 100%|███████████████████████████████████████████████████████████████████████████████████████| 13/13 [02:20<00:00, 10.81s/it] |
| | 961 | Download complete: : ██████████████████████████████████████████████████████████████████████████████████████████████████████| 7.78GB, 29.3MB/s Download complete: /usr/share/llm/Qwen2.5-7B-Instruct██████████████████████████████████████████████████████████████| 8.17GB / 8.17GB, 69.3MB/s |
| | 962 | Download complete: : ██████████████████████████████████████████████████████████████████████████████████████████████████████| 7.78GB, 29.3MB/s |
| | 963 | Reconstruction complete: 100%|████████████████████████████████████████████████████████████████████████████████████| 8.17GB / 8.17GB, 69.3MB/s |
| 968 | | Downloading bytes: | 0.00B Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads. | 0.00B / 11.2GB |
| 969 | | Fetching 19 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 19/19 [02:54<00:00, 9.21s/it] |
| 970 | | Download complete: : ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11.7GB, 35.9MB/s Download complete: /usr/share/llm/Qwen2.5-VL-7B-Instruct█████████████████████████████████████████████████████████████████████████████████████████████████████████| 12.3GB / 12.3GB, 77.9MB/s |
| 971 | | Download complete: : ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11.7GB, 35.9MB/s |
| 972 | | Reconstruction complete: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12.3GB / 12.3GB, 77.9MB/s |
| | 975 | Downloading bytes: | 0.00B Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads. |
| | 976 | Fetching 19 files: 100%|███████████████████████████████████████████████████████████████████████████████████████| 19/19 [03:42<00:00, 11.69s/it] |
| | 977 | Download complete: : ██████████████████████████████████████████████████████████████████████████████████████████████████████| 11.7GB, 64.1MB/s Download complete: /usr/share/llm/Qwen2.5-VL-7B-Instruct███████████████████████████████████████████████████████████| 12.3GB / 12.3GB, 67.3MB/s |
| | 978 | Download complete: : ██████████████████████████████████████████████████████████████████████████████████████████████████████| 11.7GB, 64.1MB/s |
| | 979 | Reconstruction complete: 100%|████████████████████████████████████████████████████████████████████████████████████| 12.3GB / 12.3GB, 67.3MB/s |
| 993 | | |
| 994 | | |
| 995 | | |
| 996 | | }}} |
| 997 | | |
| 998 | | Now, the demos are installed in the /root/ara2 directory. |
| 999 | | |
| 1000 | | To run a demo, use the run command in the ara2 directory shown in the example below: |
| 1001 | | {{{ |
| 1002 | | root@catalina:~/# cd ara2 |
| 1003 | | root@catalina:~/ara2# ./run |
| 1004 | | Usage: ./run [image-detect|vision-webapp|chat|webchat|webvlm] |
| 1005 | | root@catalina:~/ara2# ./run chat |
| 1006 | | [Config] 'Qwen2.5-7B-Instruct' is already set as enabled. |
| 1007 | | [Service] Waiting for 'Qwen2.5-7B-Instruct' to finish loading on Ara NPU (this can take 2-3 minutes)... |
| 1008 | | |
| 1009 | | [Service] AAF Connector is ready and endpoint is active! |
| 1010 | | |
| 1011 | | --- Gateworks AI LLM Session (Model: Qwen2.5-7B-Instruct) --- |
| 1012 | | Type 'exit' to stop. |
| 1013 | | |
| 1014 | | You: what is a fast animal |
| 1015 | | AI: A fast animal is one that can move very quickly, often covering long distances in a short amount of time. Some of the fastest animals include: |
| 1016 | | |
| 1017 | | 1. **Cheetah (Acinonyx jubatus)**: Known for its incredible speed, the cheetah can reach up to 70-75 miles per hour (112-120 kilometers per hour) in short bursts. |
| 1018 | | |
| 1019 | | 2. **Pronghorn Antelope (Antilocapra americana)**: This North American mammal can run at speeds of up to 60 miles per hour (97 kilometers per hour). |
| 1020 | | |
| 1021 | | 3. **Gazelle (various species)**: Gazelles are known for their agility and can run at speeds of up to 50 miles per hour (80 kilometers per hour). |
| 1022 | | |
| 1023 | | 4. **Cassowary (Casuarius casuarius)**: Although primarily a bird, the cassowary can run at speeds of up to 31 miles per hour (50 kilometers per hour) and is one of the fastest birds on land. |
| 1024 | | |
| 1025 | | 5. **Cheetah's cousin, the African Wild Dog (Lycaon pictus)**: These dogs can run at speeds of up to 40-45 miles per hour (64-72 kilometers per hour). |
| 1026 | | |
| 1027 | | 6. **Greyhound (Canis familiaris)**: While not as fast as the cheetah, greyhounds can reach speeds of up to 45 miles per hour (72 kilometers per hour) in short bursts. |
| 1028 | | |
| 1029 | | 7. **Pronghorn Antelope's relative, the Springbok (Antidorcas marsupialis)**: This African antelope can run at speeds of up to 50 miles per hour (80 kilometers per hour). |
| 1030 | | |
| 1031 | | These animals have evolved to run fast for various reasons, such as escaping predators, catching prey, or covering large distances efficiently. |
| 1032 | | |
| 1033 | | --- Stats --- |
| 1034 | | Time taken: 91.78 seconds |
| 1035 | | Throughput: 2.59 tokens/sec |
| 1036 | | ------------- |
| 1037 | | |
| 1038 | | You: |
| 1039 | | |
| 1040 | | |
| 1041 | | }}} |
| 1042 | | |
| 1043 | | All of the demos can also be seen the examples above on this page, noting the .py file will be in the respective directory. |
| 1044 | | |
| 1045 | | For example: |
| 1046 | | {{{ |
| 1047 | | |
| 1048 | | root@catalina:~/# cd ara2/chat |
| | 1000 | }}} |
| | 1001 | |
| | 1002 | |
| | 1003 | Demo python applications are installed in the /root/ara2 directory: |
| | 1004 | * launcher.py: A web-based launcher for all the demos: |
| | 1005 | {{{#!bash |
| | 1006 | root@catalina:~# python3 /root/ara2/launcher.py |
| | 1007 | |
| | 1008 | ======================================================= |
| | 1009 | 🚀 Gateworks AI Demos Launcher v1.4.0 listening on http://192.168.1.1:8888 |
| | 1010 | ======================================================= |
| | 1011 | }}} |
| | 1012 | - Now open a browser to your boards IP port 8888 |
| | 1013 | * image_detect.py - Object detection on an image |
| | 1014 | {{{#!bash |
| | 1015 | root@catalina:~/ara2/image-detect# uv run image_detect.py |
| | 1016 | Usage: image_detect.py <input_image> <output_image> [model] |
| | 1017 | root@catalina:~/ara2/image-detect# uv run image_detect.py dog.jpg coco_detections.jpg /usr/share/cnn/detection/yolov8x/model.dvm |
| | 1018 | |
| | 1019 | model: /usr/share/cnn/detection/yolov8x/model.dvm |
| | 1020 | image: dog.jpg 640x425 |
| | 1021 | I:DVAPP: Preprocess init: 640x640x0, size=1228800 bytes, SIMD=NEON |
| | 1022 | I:DVPULB[260818164508] model type is ara2 cnn |
| | 1023 | I:DVPULB[260818164509] dv_shmfd_register: register fd: 17 |
| | 1024 | I:DVPULB[260818164509] dv_shmfd_register: response buf_id: 127 |
| | 1025 | I:DVAPP: Inference init: shared memory enabled (24 MB) |
| | 1026 | I:DVAPP: Inference init: 1 inputs, 2 outputs, shm=1, thread_safe=1 |
| | 1027 | I:DVAPP: Postprocess init: Model dimensions from input: 640x640 |
| | 1028 | I:DVAPP: Postprocess init: Detected YOLOv8 model - type=0, 640x640, name=noname, outputs=2 |
| | 1029 | DETECTIONS LOGGED: FOUND 2 ACTIVE OBJECTS |
| | 1030 | ---------------------------------------------------------------------- |
| | 1031 | Object 1: ID=13 | Name=bench | Confidence=94.1% |
| | 1032 | Bounding Box -> [113, 139] to [452, 397] |
| | 1033 | ---------------------------------------------------------------------- |
| | 1034 | Object 2: ID=16 | Name=dog | Confidence=86.7% |
| | 1035 | Bounding Box -> [208, 146] to [291, 281] |
| | 1036 | ---------------------------------------------------------------------- |
| | 1037 | SUCCESS: Mapped all boxes and text labels onto -> 'coco_detections.jpg' |
| | 1038 | |
| | 1039 | I:DVAPP: Preprocess cleanup: 2 frames, avg time: 843 us |
| | 1040 | I:DVAPP: Inference cleanup: 2 frames, avg inference time: 75003 us (13.33 FPS) |
| | 1041 | I:DVAPP: Postprocess cleanup: 2 frames, avg time: 749 us |
| | 1042 | }}} |
| | 1043 | * chat.py - LLM terminal |
| | 1044 | {{{#!bash |
| | 1045 | root@catalina:~# cd /root/ara2/chat/ |
| 1052 | | [Service] Restarting eiq-aaf-connector.service... |
| 1053 | | [Service] Waiting for 'Qwen2.5-7B-Instruct' to finish loading on Ara NPU (this can take 2-3 minutes)... |
| 1054 | | .............................................................................. |
| 1055 | | }}} |
| | 1049 | [Service] Restarting eiq-aaf-connector.service... This could take several minutes |
| | 1050 | [Service] Waiting for 'Qwen2.5-7B-Instruct' to finish loading on Ara NPU..................................................................... |
| | 1051 | [Service] AAF Connector is ready and endpoint is active! |
| | 1052 | |
| | 1053 | --- Gateworks AI LLM Session (Model: Qwen2.5-7B-Instruct) --- |
| | 1054 | Type 'exit' to stop. |
| | 1055 | |
| | 1056 | You: calculate pi to 3 places |
| | 1057 | AI: To calculate π (pi) to three decimal places, you can use the approximation: |
| | 1058 | |
| | 1059 | \[ \pi \approx 3.142 \] |
| | 1060 | |
| | 1061 | This is a commonly used approximation for practical purposes. |
| | 1062 | |
| | 1063 | --- Stats --- |
| | 1064 | Time taken: 11.33 seconds |
| | 1065 | Throughput: 2.38 tokens/sec |
| | 1066 | ------------- |
| | 1067 | }}} |
| | 1068 | * vision-webapp.py - Object detection on a video or webcam |
| | 1069 | {{{#!bash |
| | 1070 | root@catalina:~/ara2/vision-webapp# uv run vision-webapp.py --camera /dev/video_webcam --mp4 /usr/share/media/sample_videos/ --port 8080 |
| | 1071 | /root/ara2/vision-webapp/vision-webapp.py:27: DeprecationWarning: Due to '_pack_', the 'AraDetection' Structure will use memory layout compatibl |
| | 1072 | e with MSVC (Windows). If this is intended, set _layout_ to 'ms'. The implicit default is deprecated and slated to become an error in Python 3.1 |
| | 1073 | 9. |
| | 1074 | class AraDetection(ctypes.Structure): |
| | 1075 | Server serving on: http://localhost:8080/ |
| | 1076 | * Serving Flask app 'vision-webapp' |
| | 1077 | * Debug mode: off |
| | 1078 | }}} |
| | 1079 | * webchat.py - LLM Web App |
| | 1080 | {{{#!bash |
| | 1081 | root@catalina:~/ara2/webchat# uv run webchat.py --port 8080 |
| | 1082 | [Config] 'Qwen2.5-7B-Instruct' is already set as enabled. |
| | 1083 | [Service] Waiting for 'Qwen2.5-7B-Instruct' to finish loading on Ara NPU... |
| | 1084 | [Service] AAF Connector is ready and endpoint is active! |
| | 1085 | |
| | 1086 | ======================================================= |
| | 1087 | 🚀 Gateworks Edge LLM WebChat running on http://0.0.0.0:8080 |
| | 1088 | ======================================================= |
| | 1089 | |
| | 1090 | INFO: Started server process [979] |
| | 1091 | INFO: Waiting for application startup. |
| | 1092 | INFO: Application startup complete. |
| | 1093 | INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit) |
| | 1094 | }}} |
| | 1095 | * webvlm.py - VLM Web App |
| | 1096 | {{{#!bash |
| | 1097 | root@catalina:~# cd /root/ara2/webvlm/ |
| | 1098 | root@catalina:~/ara2/webvlm# uv run webvlm.py --host 0.0.0.0 --port 8080 --video-dir /usr/share/media/sample_videos --aaf-server http://127.0.0. |
| | 1099 | 1:8000 |
| | 1100 | [Config] Enabling 'Qwen2.5-VL-7B-Instruct' in server_config.json... |
| | 1101 | [Service] Restarting eiq-aaf-connector.service... This could take several minutes. |
| | 1102 | [Service] Waiting for 'Qwen2.5-VL-7B-Instruct' to finish loading on Ara NPU..................................................................... |
| | 1103 | ................................ |
| | 1104 | [Service] AAF Connector is ready and VLM endpoint is active! |
| | 1105 | |
| | 1106 | ======================================================= |
| | 1107 | 🚀 Gateworks VLM Edge Studio running on http://0.0.0.0:8080 |
| | 1108 | ======================================================= |
| | 1109 | |
| | 1110 | INFO: Started server process [1259] |
| | 1111 | INFO: Waiting for application startup. |
| | 1112 | INFO: Application startup complete. |
| | 1113 | INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit) |
| | 1114 | }}} |