Trying to Build a Digital Brain for the University
1. The Dream: a Digital Brain
Navigating a university website like https://univlora.edu.al often feels like digital archaeology. Vital information — admissions criteria, academic regulations, and administrative mandates — is frequently fragmented across deep directories, nested subpages, and PDF documents. My goal was to synthesize this chaos into an intelligent system, a "digital brain" that can answer questions related to UV, based on the information and documents that are already published on the website.
The technical term for such a system is: Retrieval-Augmented Generation (RAG). It is an architectural framework designed to improve the accuracy and reliability of Large Language Models (LLMs) by giving them access to data outside of their initial training set.
Trying to build a RAG system for the UV seemed like a straightforward weekend project. The plan was elegant: gather all the university regulations, guidelines, and curriculum documents, feed them into some AI tool, and embed a sleek chatbot on our website so that students and staff could get instant answers in Albanian.
But as any programer will tell you, things are never as easy as they seem on the first sight. From the domain boundaries of cloud-hosted platforms to the brutal reality of running optical character recognition (OCR) on scanned documents using GPU-less servers, my journey was a series of technical battles.
2. The Easy Way: NotebookLM
Initially, I realized that a simple and highly accurate RAG system can be built in minutes using Google’s NotebookLM. By creating a notebook and uploading the PDF guidelines, university rules, curriculum documents etc. we immediately get a highly grounded, conversational assistant, that cites its sources perfectly. The language of the documents can be Albanian, and the questions and answers can be in Albanian of course (as well as in English or any other language).
Then, this notebook can be shared with other people, such that only a small group of people have full access (for keeping the uploaded documents up to date), and the rest can only ask questions and get answers based on those documents, but cannot modify the documents or other aspects of the notebook.
Figure 1. The notebook with all the sources
|
Figure 2. The chat view that can be used by anyone
|
A problem with this approach is that the notebook can be shared only with the members of the organization, because UV is using the Google Workspace Education Fundamentals tier (which is free). Sharing it with anonymous people who might have any questions about UV is not possible.
Another problem is that it is not possible to embed it as a nice chatbot on a web page (for example on the website of UV).
3. Self-Hosted RAG Platforms
To gain complete control and embed the chat assistant directly on our website, I turned to self-hosted open-source wrappers. Initially I tried AnythingLLM (https://llm.univlora.al/), and later I also tried:
These platforms are outstanding — they provide clean multi-user interfaces, workspace organization, and excellent document management tools. Most of them also allow you to embed an AI chat assistent on your website (for example AnythingLLM does).
None of them provides AI models out of the box. They act as the orchestration and database layer, but you must supply:
-
An embedding model to vectorize the documents (such as
nomic-embed-textorbge-m3). -
An LLM model to synthesize the retrieved context and formulate the response.
-
The data or documents from your website, because usually they are not able to crawl, scrape and process a whole website automatically.
The AI models required by them can be provided by service providers like Gemini, Claude, Anthropic etc. (using API keys, subscriptions, etc. which cost money).
But they can also be locally installed models (self-hosted), typically managed and served via Ollama.
The subscription options were not feasible for me, even just for testing, because I don’t have any budget for these project. So, I focused my efforts only on exploring and evaluating the self-hosted options/solutions.
4. The Art of Web Crawling
With AnythingLLM ready, I needed to feed it the information
from the website. I attempted to crawl the University of Vlora’s
website (https://univlora.edu.al) to download all published pages
and PDFs.
I found some nice crawling tools:
-
siteone-crawler (both cli and desktop version)
-
spider_cli (only cli)
I eventually used spider_cli to crawl the website. Here is a basic script:
spider.sh#!/bin/bash
url='https://univlora.edu.al/'
output_dir='./scraped_site'
agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"
mkdir -p $output_dir
spider \
--url "$url" \
--subdomains \
--return-format markdown \
--headless \
--block-images \
--stealth \
--delay 300 \
--agent "$agent" \
download \
--target-destination $output_dir
However this crawling scripts ran into several obstacles. For example, there are some PDF and office docs on the website, that are available for view or download, but they are shared (publicly) from google drive. The script is missing them for two reasons:
-
External Domain Boundaries: By default,
spider_clirestricts crawling to the target domain (and its subdomains). Links pointing to external domains likedrive.google.comordocs.google.comare ignored. -
Google Drive Link Mechanics: Google Drive share links (e.g.
https://drive.google.com/file/d/…/view]) point to an HTML/JavaScript viewer web application, not a raw binary file (.pdfor.docx). Even ifspider_clifollowed external links, spider download would only save the wrapper HTML page of Google Drive’s viewer rather than downloading the actual file.
Another obstacle is that the spider command is failing to download PDF
docs from the site, maybe because they are displayed on an iframe
inside the webpage. spider_cli often skips <iframe> targets
because it treats iframe source URLs as embedded frame assets rather
than standard navigational links. This is a severe problem because it
turns out that most of the information on the UV site is published as
PDF docs.
The most reliable way to handle this in a Bash workflow is a pipeline like this:
-
Use
spider_clito crawl and download the site’s HTML pages. -
Extract all Google Drive URLs from the scraped content and download the underlying files using
gdown(a CLI tool designed to handle Google Drive sharing links and direct file extraction;pipx install gdown). -
Parse the scraped HTML files for
<iframe>srcattributes and direct.pdfreferences, resolve relative paths against the domain, and download them usingcurlorwget.
5. PDF OCR and Preprocessing
Once I successfully downloaded the website, including all the PDFs,
the next step was document processing, in order to create a dataset
and upload/injest it to AnythingLLM. The HTML and PDF formats are not
quite suitable for AnythingLLM, but plain text or markdown (.txt or
.md) are perfect.
Converting HTML pages to markdown is rather easy, even a simple tool
like pandoc does it well. There are also some more advanced tools
that remove the header, footer, and the stuff that repeats on every
page, in order to keep only the most important information of the
page.
However, it turns out that most of the information on the UV website is published as PDF docs, the information of HTML pages is very slim. So, the most important task is actually converting PDFs to markdown (or plain text).
A simple tool for extracting the text from a PDF file is pdftotext:
apt install poppler-utils # provides pdftotext
pdftotext file1.pdf
But here we hit another problem: most of the PDFs published online are
scanned, image-only documents. Standard PDF parsers (like pdftotext)
extract zero text from these files. We need some tool that can apply
image processing, and optical character recognition (OCR) on them, in
order to extract the text from them.
OCRmyPDF is such a tool, that is easy to install and use:
# install packages
apt install \
ocrmypdf \
tesseract-ocr \
tesseract-ocr-sqi \
unpaper
# process vba7-2025.pdf and generate vba7-2025.ocr.pdf
ocrmypdf -l sqi+eng \
--force-ocr \
--deskew \
--clean \
--rotate-pages \
--oversample 300 \
--tesseract-pagesegmode 1 \
vba7-2025.pdf \
vba7-2025.ocr.pdf
# extract the text to stdout
pdftotext vba7-2025.ocr.pdf -
It is noticeable from the example that a simple OCR of the scanned PDF cannot not do a clean job at extracting the information. Especially the tabular data inside the document are broken.
To solve this, I tried to use specialized document processing tools, like Docling and Marker-PDF. These tools make an OCR first, and then utilize deep-learning models (such as Surya) in order to reconstruct the layout and structure of the original document.
5.1. Docling
-
Installation:
pipx install torch torchvision --index-url https://download.pytorch.org/whl/cpu pipx install docling[full]I am installing the torch version that works only with CPU, because I don’t have any GPUs on my machine. -
Test command:
docking --help docling convert --help docling convert \ --ocr \ --ocr-engine tesseract \ --ocr-lang sqi \ --ocr-mode full_page \ --image-export-mode placeholder \ vba7-2025.pdfThe output of the command:
2026-09-12 19:40:58,346 INFO docling.document_converter: Going to convert document batch... 2026-09-12 19:40:58,347 INFO docling.document_converter: Initializing pipeline for StandardPdfPipeline with opt ions hash 3378e1b846087dde47fa6e0714d0ec48 2026-09-12 19:40:58,393 INFO docling.models.utils.hf_model_download: Fetching model docling-project/docling-lay out-heron (revision: main)... 2026-09-12 19:40:58,665 INFO docling.models.utils.hf_model_download: Model docling-project/docling-layout-heron already cached at /root/.cache/huggingface/hub/models--docling-project--docling-layout-heron/snapshots/8f39ad3c0b 4c58e9c2d2c84a38465abf757272d8 Loading weights: 100%|███████████████████████████████████████████████████████| 770/770 [00:00<00:00, 6531.11it/s] 2026-09-12 19:40:59,436 INFO docling.models.utils.hf_model_download: Fetching model docling-project/docling-mod els (revision: v2.3.0)... 2026-09-12 19:40:59,591 INFO docling.models.utils.hf_model_download: Model docling-project/docling-models alrea dy cached at /root/.cache/huggingface/hub/models--docling-project--docling-models/snapshots/fc0f2d45e2218ea24bce50 45f58a389aed16dc23 2026-09-12 19:41:00,031 INFO docling.pipeline.base_pipeline: Processing document vba7-2025.pdf
The result of the conversion:
<!-- image --> <!-- image --> <!-- image --> ## UNIVERSITETI "ISMAIL QEMALI" VLORË BORDI I ADMINISTRIMIT Vlorë më,oj <!-- image --> <!-- image --> ## VENDIM <!-- image --> ## PËR PAGESËN E ANËTARËVE TË GRUPEVE TË PUNËS PËR SHKRIM PROJEKTESH Në mbështetje të nenit 49, pika 1, gërma ë, të Ligjit Nr. 8072015 "Për arsimin e lartë dhe kërkimin shkencor në institucionet e arsimit të lartë në Republikën e Shqipërisë", nenit 25, të Statutit të Universitetit "Ismail Qemali", Vlorë, Udhëzimit nr. 29, datë 10.09.2018 "Për veprimtarinë dhe ngarkesën mësimore të personelit akademik në institucionet e arsimit të lartë", si dhe referuar propozimit të Administratorit ardhur me shkresë 3122, prot, datë 26.12.2024, Bordi i Administrimit, në mbledhjen e datës 09.01.2025, ## VENDOSI : 1. Të miratojë pagesën e grupeve të punës sipas materialit bashkëlidhur dhe pjesë e këtij vendimi. 2. Ngarkohet për zbatimin e ketij vendimi Administratori dhe Drejtoria e Shërbimeve Mbështetëse të UVsë. Ky vendim hyn në fuqi menjëherë. KRYETAR <!-- image --> <!-- image --> Nr. SI 3. L....Prot <!-- image --> ## UNIVERSITETI "ISMAIL QEMALI" VLORË ADMINISTRATOR Vlorë, më Vo, 11 2024 Lënda: Përciellje për miratimin e efektit financiar për shkrimfhartim projektesh. ## BORDIT TË ADMINISTRIMIT TË UNIVERSITETIT "ISMAIL QEMALI'' VLORË Z. SOTIR NIKOLLA Në zbatim të Ligjit nr. 8072015 "Për Arsimin e Lartë dhe Kërkimin Shkencor në Institucionet e Arsimit të Lartë në Republikën e Shqiperisë", Udhëzimit nr. 29 datë 10.09.2018 për "Veprimtarinë dhe ngarkesën mësimore të personelit akademik në IAL", ligjit nr. 9936 datë 26.06.2008 "Për menaxhimin e sistemit buxhetor në Republikën e Shqipërisë", i ndryshuar, ligjit nr. 10296 datë 08.07.2010 "Për menaxhimin financiar dhe kontrollin" ligjit nr. 97723 "Për buxhetin e vitit 2024", vendimit të Bordit të Administrimit nr. 8 datë 23.02.2024 "Për miratimin e buxhetit të Uinversitetit "Ismail Qemali" Vlorë për vitin 2024", Vendimin e Senatit Akademik nr. 17 datë 06.05.2021, vendimit të Bordit të Administrimit nr. 45 datë 05.12.2023 "Për miratimin e rregullores financiare të Universiteti "Ismail Qemali" Vlorë", si dhe shkresave të Drejtorisë së Sigurimit të Brendshëm të Cilësisë dhe Projekteve shkresa nr. 298971 prot., datë 20.12.2024 "Relacion mbi shkresën me nr. 197812 prot., datë 11.12.2024" efekti financiar për grupin e punës të cilat përmbushin çdo detyrim të vendimit tëSenatit Akademik nr. 17 datë 06.05.2021 dhe rregullores financiare miratuar me vendimit të Bordit të Administrimit nr. 45 datë 05.12.2023 është si më poshtë : | Emer Mbiemer | Pozicioni titulli” grada | Projekti | Vleralore | Oret projekt )( | Oret e punes se pagueshme | Vlera ) TotalejLeke | |----------------|----------------------------|------------|-------------|-------------------|-----------------------------|-----------------------| | Fjoralba Velaj | J Prof.As | VVIKADIH | it | | | 90,650 | | Zamira Sinaj | J Prof.As | (Aplikim | 1,295 | | I I | 25,900 | | Rezarta Brokaj | Dr | viti 2023- | 940 J) | | I I | 28.200 | | Migena Petanaj | Dr | 2024) J | 940 ) | | I I | 18,800 | | Totali | | | | | | 163,550 | Bazuar në shkresën e mësipërme janë evidentuar orët për secilin anëtar të grupeve të punës, vlerë e cila është brenda parashikimit të miratuar në buxhetin e vitit 2024 miratuar me vendim BA nr. 2 datë 23.02.2024. Duke ju falenderuar për bashkëpunimini ADMINISTRATOR <!-- image --> <!-- image --> <!-- image --> ## REPUBLIKA E SHQIPËRISË ## UNIVERSITETI "ISMAIL QEMALI" VLORË ## DREJTORIA E SIGURIMIT TË BRENDSHËM TË CILËSISË DHE PROJEKTEVE <!-- image --> Lënda: Vlorë, më KI11212024 Relacion mbi shkresën me nr.197872 prot, datë 1171272024 <!-- image --> ## REKTORIT TË UNIVERSITETIT "ISMAIL QEMALI", VLORË PROF. DR AURELA ## SALIAJ KËTU Mbështetur në informacionin e përcjell me shkresë nr.2989 prot, datë 18.12.2024 si dhe nr. 1708 prot, datë 05.08.2024, të Dekanit të Fakultetit të Ekonomisë, për pagesën e anëtarve të personelit akademik të përfshirë në projectpropozimin me akronim IVIKADIH, mbështetur në nenin 21 dhe 22 te Rregullores financiare të UV-së, miratuar me Vendim Bordi Administrimi Nr.45, date 05.12.2023, në vendimin e Senatit Akademik Nr.17, date 06.05.2021 "Per miratimin e procedures se aplikimit, miratimit, implementimit dhe pageses e projekteve te financuara nga programet e BE-se", rezulton se grupi i punës ka zbatuar cdo detyrim që lidhet në kërkesën pranë Rektorit për pagimin e orëve të punës prej BA-së për projekt propozimet e aplikuara në vitin akademik 2023-2024, si më poshtë vijon: | Emer mbiemer | Acronim | Emri Donatorit ose Kreditorit | Viti aplikimit | Orët ec angazhimit | Orët e punës së pagueshme, | |-----------------------|-----------|---------------------------------|------------------|----------------------|------------------------------| | Prof as Fioralba Vela | | | Viti | 70 | 70, | | Prof As Zamira Sinaj | | | - | | | | | | | akademik | 20 | 20 | | Dr. Rezarta Brokaj | | | 23-24 | | | | | | | Aplikuar | 30 | 30, | | Dr. Migena Petanaj | VVIKADIH | 1E4 CBHE | shkurt 24 | | | | | | | | 20 | 20 | DREJTOR Rezarta Sinahali j <!-- image --> <!-- image --> <!-- image --> ## REPUBLIKA E SHQIPËRISË ## UNIVERSITETI "ISMAIL QEMALI" VLORË REKTORI REKTORI Prof. Dr. Aurela SALIAJ <!-- image --> <!-- image --> Vlorë më 0 i .2024 Lënda : Ngarkohen për zbatimin e shkresës bashkëlidhur në respektim të legjislacionit përkatës në fuqi : ## Drejtuar: - X Administrator - -t Drejtoria e Shërbimeve Mbështetëse - e Sektori i Financës dhe Realizimit të Buxhetit - Sektori i Prokurimeve - e Sektori i Shërbimeve <!-- image -->
5.2. Marker-PDF
-
Installation:
pipx install torch torchvision --index-url https://download.pytorch.org/whl/cpu pipx install "marker-pdf[full]" wget https://github.com/ggml-org/llama.cpp/releases/download/b10278/llama-b10278-bin-ubuntu-x64.tar.gz tar xfz llama-b10278-bin-ubuntu-x64.tar.gz cp llama-b10278/llama-server /usr/local/bin/ cp llama-b10278/*.so* /usr/local/bin/ llama-server --version -
Testing:
marker_single --help | less marker_single \ vba7-2025.pdf \ --output_dir ./ \ --disable_image_extractionThe output of the command:
Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads. 2026-09-12 20:42:56,664 [INFO] marker: Table processing stats: {'tables_ocr': 2, 'tables_total': 2} 2026-09-12 20:42:56,686 [INFO] marker: Saved markdown to ./vba7-2025 2026-09-12 20:42:56,687 [INFO] marker: Total time: 1035.676918745041 Force-killed llamacpp (pid 350394)The result of the conversion:
REPUBLIKA E SHQIPËRISË UNIVERSITETI "ISMAIL QEMALI" VLORË BORDI I ADMINISTRIMIT Nr. 61/7 Prot. Vlorë më, 09.01.2025 VENDIM Nr. 2, datë 09.01.2025 **PËR PAGESËN E ANËTARËVE TË GRUPEVE TË PUNËS PËR SHKRIM PROJEKTESH** Në mbështetje të nenit 49, pika 1, gërma ë, të Ligjit Nr. 80/2015 "Për arsimin e lartë dhe kërkimin shkencor në institucionet e arsimit të lartë në Republikën e Shqipërisë", nenit 25, të Statutit të Universitetit "Ismail Qemali", Vlorë, Udhëzimit nr. 29, datë 10.09.2018 "Për veprimtarinë dhe ngarkesën mësimore të personelit akademik në institucionet e arsimit të lartë", si dhe referuar propozimit të Administratorit ardhur me shkresë 3122, prot, datë 26.12.2024, Bordi i Administrimit, në mbledhjen e datës 09.01.2025, **VENDOSI :** 1. 1. Të miratojë pagesën e grupeve të punës sipas materialit bashkëlidhur dhe pjesë e këtij vendimi. 2. 2. Ngarkohet për zbatimin e ketij vendimi Administratori dhe Drejtoria e Shërbimeve Mbështetëse të UV- së. Ky vendim hyn në fuqi menjëherë. **K R Y E T A R** **SOTIR NIKOLLA** REPUBLIKA E SHQIPËRISË **UNIVERSITETI "ISMAIL QEMALI" VLORË ADMINISTRATOR** Nr.. 31.2.2... Prot Vlorë, më 26. 11. 2024 **Lënda:** Përciellje për miratimin e efektit financiar për shkrim/hartim projektesh. **BORDIT TË ADMINISTRIMIT TË UNIVERSITETIT "ISMAIL QEMALI" VLORË Z. SOTIR NIKOLLA** Në zbatim të Ligjit nr. 80/2015 "Për Arsimin e Lartë dhe Kërkimin Shkencor në Institucionet e Arsimit të Lartë në Republikën e Shqiperisë", Udhëzimit nr. 29 datë 10.09.2018 për "Veprimtarinë dhe ngarkesën mësimore të personelit akademik në IAL", ligjit nr. 9936 datë 26.06.2008 "Për menaxhimin e sistemit buxhetor në Republikën e Shqipërisë", i ndryshuar, ligjit nr. 10296 datë 08.07.2010 "Për menaxhimin financiar dhe kontrollin" ligjit nr. 97/23 "Për buxhetin e vitit 2024", vendimit të Bordit të Administrimit nr. 8 datë 23.02.2024 "Për miratimin e buxhetit të Universitetit "Ismail Qemali" Vlorë për vitin 2024", Vendimin e Senatit Akademik nr. 17 datë 06.05.2021, vendimit të Bordit të Administrimit nr. 45 datë 05.12.2023 "Për miratimin e rregullores financiare të Universitetit "Ismail Qemali" Vlorë", si dhe shkresave të Drejtorisë së Sigurimit të Brendshëm të Cilësisë dhe Projekteve shkresa nr. 2989/1 prot., datë 20.12.2024 "Relacion mbi shkresën me nr. 1978/2 prot., datë 11.12.2024" efekti financiar për grupin e punës të cilat përmbushin çdo detyrim të vendimit të Senatit Akademik nr. 17 datë 06.05.2021 dhe rregullores financiare miratuar me vendimit të Bordit të Administrimit nr. 45 datë 05.12.2023 është si më poshtë : | Nr | Emer Mbiemer | Pozicioni/<br>titulli/<br>grada | Projekti | Vlera/ore | Oret projekt | Oret e punes<br>se pagueshme | Vlera<br>Totale/Leke | |----|----------------|---------------------------------|---------------------|-----------|--------------|------------------------------|----------------------| | 1 | Fjoralba Velaj | Prof.As | WIKADIH | 1,295 | 70 | 70 | 90,650 | | 2 | Zamira Sinaj | Prof.As | (Aplikim | 1,295 | 20 | 20 | 25,900 | | 3 | Rezarta Brokaj | Dr | viti 2023-<br>2024) | 940 | 30 | 30 | 28,200 | | 4 | Migena Petanaj | Dr | | 940 | 20 | 20 | 18,800 | | 4 | <b>Totali</b> | | | | <b>140</b> | <b>140</b> | <b>163,550</b> | Bazuar në shkresën e mësipërme janë evidentuar orët për secilin anëtar të grupeve të punës, vlerë e cila është brenda parashikimit të miratuar në buxhetin e vitit 2024 miratuar me vendim BA nr. 2 datë 23.02.2024. Duke ju falenderuar për bashkëpunimin! ADMINISTRATOR REPUBLIKA E SHQIPËRISË UNIVERSITETI "ISMAIL QEMALI" VLORË DREJTORIA E SIGURIMIT TË BRENDSHËM TË CILËSISË DHE PROJEKTEVE Projekt 23.12.2024 [Signature] Nr. 298P / Prot. / Vlorë, më 27/12/2024 Lënda: Relacion mbi shkresën me nr.1978/2 prot, datë 11/12/2024 **REKTORIT TË UNIVERSITETIT "ISMAIL QEMALI", VLORË** **PROF. DR AURELA SALIAJ** **KËTU** Mbështetur në informacionin e përcjell me shkresë nr.2989 prot, datë 18.12.2024 si dhe nr. 1708 prot, datë 05.08.2024, të Dekanit të Fakultetit të Ekonomisë, për pagesën e anëtarve të personelit akademik të përfshirë në projekt-propozimin me akronim WIKADIH, mbështetur në nenin 21 dhe 22 te Rregullores financiare të UV-së, miratuar me Vendim Bordi Administrimi Nr.45, date 05.12.2023, në vendimin e Senatit Akademik Nr.17, date 06.05.2021 "Per miratimin e procedures se aplikimit, miratimit, implementimit dhe pageses e projekteve te financuara nga programet e BE-se", rezulton se grupi i punës ka zbatuar cdo detyrim që lidhet në kërkesën pranë Rektorit për pagimin e orëve të punës prej BA-së për projekt propozimet e aplikuara në vitin akademik 2023-2024, si më poshtë vijon: | Emer mbiemer | Acronim | Emri Donatorit ose Kreditorit | Viti aplikimit | Orët e angazhimit | Orët e punës së pagueshme | | | |-----------------------|---------|-------------------------------|----------------------------------------------------|-------------------|---------------------------|----|----| | Prof as Fioralba Vela | WIKADIH | E+ CBHE | Viti<br>akademik<br>23-24<br>Aplikuar<br>shkurt 24 | 70 | 70 | | | | Prof As Zamira Sinaj | | | | | | | | | Dr. Rezarta Brokaj | | | | | | 20 | 20 | | Dr. Migena Petanaj | | | | | | 30 | 30 | | | | | | | | 20 | 20 | **DREJTOR** Rezarta Sinahaliaj ![]()REPUBLIKA E SHQIPËRISË UNIVERSITETI "ISMAIL QEMALI" VLORË REKTORI Vlorë më, 20 | 2 . 2024 **Lënda :** Ngarkohen për zbatimin e shkresës bashkëlidhur në respektim të legjislacionit përkatës në fuqi : **Drejtuar:** ➤ Administrator ✓ - • Drejtoria e Shërbimeve Mbështetëse - • Sektori i Financës dhe Realizimit të Buxhetit - • Sektori i Prokurimeve - • Sektori i Shërbimeve **REKTORI** **Prof. Dr. Aurela SALIAJ**Note that it is taking aout 17 min just for processing one document (Total time: 1035.676918745041). Both DoclingandMarker-PDFdownload open-source models from Hugging Face and run them locally using PyTorch. -
Testing with a Small Local Model:
# install and test ollama apt install -y curl ca-certificates curl -fsSL https://ollama.com/install.sh | sh systemctl status ollama ollama pull qwen2.5vl ollama list ollama run qwen2.5vlmarker_single \ vba7-2025.pdf \ --output_dir ./ \ --disable_image_extraction\ --use_llm \ --llm_service marker.services.ollama.OllamaService \ --ollama_base_url http://localhost:11434 \ --ollama_model qwen2.5vlThe output of the command:
Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads. 2026-09-13 15:47:37,270 [INFO] marker: Table processing stats: {'tables_ocr': 2, 'tables_total': 2} LLMTableProcessor running: 50%|█████████████████████████ | 1/2 [02:58<02:58, 178.93s/it]2026-09-13 15:53:21,496 [INFO] marker: Table parsing warning: too many columns found 2026-09-13 15:53:21,496 [INFO] marker: Table parsing warning: too many columns found 2026-09-13 15:53:21,496 [INFO] marker: Table parsing warning: too many columns found 2026-09-13 15:53:21,497 [INFO] marker: Table parsing warning: too many columns found LLMTableProcessor running: 100%|██████████████████████████████████████████████████| 2/2 [05:44<00:00, 172.11s/it] LLM processors running: 100%|████████████████████████████████████████████████████| 13/13 [09:58<00:00, 46.07s/it] Running LLMSectionHeaderProcessor: 100%|███████████████████████████████████████████| 1/1 [00:39<00:00, 39.48s/it] 2026-09-13 16:03:59,913 [INFO] marker: Saved markdown to ./vba7-2025 2026-09-13 16:03:59,913 [INFO] marker: Total time: 2011.3281693458557 Force-killed llamacpp (pid 416339)The result of the conversion:
Image /page/0/Picture/19 description: The image shows a circular emblem with the letters 'UV' prominently displayed in the center. Surrounding the 'UV' are the words 'Virtus', 'Scientia', and 'Veritas', arranged in a circular fashion. Below the 'UV' and the surrounding words, the text reads 'Universitati Image /page/0/Picture/20 description: The image depicts a shield-shaped emblem with a black and white design. At the center of the shield is a stylized black eagle with outstretched wings, facing to the left. The background of the shield is divided into two sections: the upper section is white, and the lower section is black. The eagle appears to be in flight, with its talons extended, and its head turned slightly to the side. The overall design is symmetrical and has a heraldic appearance. REPUBLIKA E SHQIPËRISË UNIVERSITETI "ISMAIL QEMALI" VLORË BORDI I ADMINISTRIMIT Nr. 61/7 Prot. Vlorë më, 09.01.2025 VENDIM Nr. 2, datë 09.01.2025 **PËR PAGESËN E ANËTARËVE TË GRUPEVE TË PUNËS PËR SHKRIM PROJEKTESH** Në mbështetje të nenit 49, pika 1, gërma ë, të Ligjit Nr. 80/2015 "Për arsimin e lartë dhe kërkimin shkencor në institucionet e arsimit të lartë në Republikën e Shqipërisë", nenit 25, të Statutit të Universitetit "Ismail Qemali", Vlorë, Udhëzimit nr. 29, datë 10.09.2018 "Për veprimtarinë dhe ngarkesën mësimore të personelit akademik në institucionet e arsimit të lartë", si dhe referuar propozimit të Administratorit ardhur me shkresë 3122, prot, datë 26.12.2024, Bordi i Administrimit, në mbledhjen e datës 09.01.2025, **VENDOSI :** 1. 1. Të miratojë pagesën e grupeve të punës sipas materialit bashkëlidhur dhe pjesë e këtij vendimi. 2. 2. Ngarkohet për zbatimin e ketij vendimi Administratori dhe Drejtoria e Shërbimeve Mbështetëse të UV- së. Ky vendim hyn në fuqi menjëherë. **K R Y E T A R** **SOTIR NIKOLLA** Image /page/0/Picture/34 description: The image shows a document with a signature and a seal. The name 'SOTIR NIKOLLA' is printed at the top. Below the name, there is a blue signature. To the right, there is a circular seal with the text 'REPUBLIKA E SHQIPERISE' (Republic of Albania) and 'MINISTRIA E PUNES' (Ministry of Labor). The document appears to be official, possibly a certificate or an official document from Albania. Image /page/1/Picture/17 description: The image shows a circular emblem with the text 'Virtus - Scientia - Veritas' arranged in a circular fashion around the perimeter. In the center, there is a stylized 'UV' with a swoosh underneath it. Below the swoosh, the text 'universiteti Image /page/1/Picture/18 description: The image depicts a shield-shaped emblem featuring a black double-headed eagle with outstretched wings. The eagle is centered within the shield, which has a textured, possibly fabric-like background. The design is simple and symmetrical, with the eagle's head facing forward and its wings spread wide, symbolizing strength and vigilance. REPUBLIKA E SHQIPËRISË **UNIVERSITETI "ISMAIL QEMALI" VLORË ADMINISTRATOR** Nr.. 31.2.2... Prot Vlorë, më 26. 11. 2024 **Lënda:** Përciellje për miratimin e efektit financiar për shkrim/hartim projektesh. **BORDIT TË ADMINISTRIMIT TË UNIVERSITETIT "ISMAIL QEMALI" VLORË Z. SOTIR NIKOLLA** Në zbatim të Ligjit nr. 80/2015 "Për Arsimin e Lartë dhe Kërkimin Shkencor në Institucionet e Arsimit të Lartë në Republikën e Shqiperisë", Udhëzimit nr. 29 datë 10.09.2018 për "Veprimtarinë dhe ngarkesën mësimore të personelit akademik në IAL", ligjit nr. 9936 datë 26.06.2008 "Për menaxhimin e sistemit buxhetor në Republikën e Shqipërisë", i ndryshuar, ligjit nr. 10296 datë 08.07.2010 "Për menaxhimin financiar dhe kontrollin" ligjit nr. 97/23 "Për buxhetin e vitit 2024", vendimit të Bordit të Administrimit nr. 8 datë 23.02.2024 "Për miratimin e buxhetit të Universitetit "Ismail Qemali" Vlorë për vitin 2024", Vendimin e Senatit Akademik nr. 17 datë 06.05.2021, vendimit të Bordit të Administrimit nr. 45 datë 05.12.2023 "Për miratimin e rregullores financiare të Universitetit "Ismail Qemali" Vlorë", si dhe shkresave të Drejtorisë së Sigurimit të Brendshëm të Cilësisë dhe Projekteve shkresa nr. 2989/1 prot., datë 20.12.2024 "Relacion mbi shkresën me nr. 1978/2 prot., datë 11.12.2024" efekti financiar për grupin e punës të cilat përmbushin çdo detyrim të vendimit të Senatit Akademik nr. 17 datë 06.05.2021 dhe rregullores financiare miratuar me vendimit të Bordit të Administrimit nr. 45 datë 05.12.2023 është si më poshtë : | Nr | Emer Mbiemer | Pozicioni/<br>titulli/<br>grada | Projekti | Vlera/ore | Oret projekt | Oret e punes<br>se pagueshme | Vlera<br>Totale/Leke | |----|----------------|---------------------------------|---------------------|-----------|--------------|------------------------------|----------------------| | 1 | Fjoralba Velaj | Prof.As | WIKADIH | 1,295 | 70 | 70 | 90,650 | | 2 | Zamira Sinaj | Prof.As | (Aplikim | 1,295 | 20 | 20 | 25,900 | | 3 | Rezarta Brokaj | Dr | viti 2023-<br>2024) | 940 | 30 | 30 | 28,200 | | 4 | Migena Petanaj | Dr | | 940 | 20 | 20 | 18,800 | | 4 | Totali | | | | 140 | 140 | 163,550 | Bazuar në shkresën e mësipërme janë evidentuar orët për secilin anëtar të grupeve të punës, vlerë e cila është brenda parashikimit të miratuar në buxhetin e vitit 2024 miratuar me vendim BA nr. 2 datë 23.02.2024. Duke ju falenderuar për bashkëpunimin! ADMINISTRATOR Image /page/1/Picture/33 description: The image appears to be a close-up of a document or certificate with text and a signature. The text includes names, email addresses, and a logo or seal. The visible text includes 'Saimir XHELA', 'univlora.edu.al', and 'info@univlora.edu.al'. There is also a circular seal or stamp with text around it, but the text is partially obscured and difficult to read. The document seems to be related to an administrative or educational institution. Image /page/2/Picture/16 description: The image shows a circular emblem with the text 'Universidad de las Américas' written around the outer edge. The center of the emblem features the letters 'UV' in a stylized font, with a wavy line underneath. The design is monochromatic and appears to be a seal or logo. Image /page/2/Picture/17 description: The image appears to be a close-up of a textured surface with a pattern that resembles a shield or emblem. The design includes a central motif that looks like a stylized tree or plant with branches extending outward. The background has a ribbed or segmented pattern, possibly resembling a rib cage or a series of parallel lines. The overall color scheme is monochromatic, with shades of gray and black. REPUBLIKA E SHQIPËRISË UNIVERSITETI "ISMAIL QEMALI" VLORË DREJTORIA E SIGURIMIT TË BRENDSHËM TË CILËSISË DHE PROJEKTEVE Projekt 23.12.2024 [Signature] Nr. 298P / Prot. / Vlorë, më 27/12/2024 Lënda: Relacion mbi shkresën me nr.1978/2 prot, datë 11/12/2024 **REKTORIT TË UNIVERSITETIT "ISMAIL QEMALI", VLORË** **PROF. DR AURELA SALIAJ** **KËTU** Mbështetur në informacionin e përcjell me shkresë nr.2989 prot, datë 18.12.2024 si dhe nr. 1708 prot, datë 05.08.2024, të Dekanit të Fakultetit të Ekonomisë, për pagesën e anëtarve të personelit akademik të përfshirë në projekt-propozimin me akronim WIKADIH, mbështetur në nenin 21 dhe 22 te Rregullores financiare të UV-së, miratuar me Vendim Bordi Administrimi Nr.45, date 05.12.2023, në vendimin e Senatit Akademik Nr.17, date 06.05.2021 "Per miratimin e procedures se aplikimit, miratimit, implementimit dhe pageses e projekteve te financuara nga programet e BE-se", rezulton se grupi i punës ka zbatuar cdo detyrim që lidhet në kërkesën pranë Rektorit për pagimin e orëve të punës prej BA-së për projekt propozimet e aplikuara në vitin akademik 2023-2024, si më poshtë vijon: | Emer mbiemer | Acronim | Emri Donatorit ose Kreditorit | Viti aplikimit | Orët e angazhimit | Orët e punës së pagueshme | | | |-----------------------|---------|-------------------------------|----------------------------------------------------|-------------------|---------------------------|----|----| | Prof as Fioralba Vela | WIKADIH | E+ CBHE | Viti<br>akademik<br>23-24<br>Aplikuar<br>shkurt 24 | 70 | 70 | | | | Prof As Zamira Sinaj | | | | | | | | | Dr. Rezarta Brokaj | | | | | | 20 | 20 | | Dr. Migena Petanaj | | | | | | 30 | 30 | | | | | | | | 20 | 20 | **DREJTOR** Rezarta Sinahaliaj # BRETOR **Dita Sinahaliaj** Image /page/3/Picture/15 description: The image is a black and white illustration featuring a stylized figure of a person holding a flag. The figure is depicted in a dynamic pose, with one arm raised and the other bent at the elbow, holding a flag with a visible emblem. The number '80' is prominently displayed in a large, stylized font, with the word 'VJETORI' written along the curve of the number. The overall design has a bold and graphic quality. Image /page/3/Picture/16 description: The image depicts a shield emblem featuring a double-headed eagle. The eagle is detailed with intricate feather patterns and is positioned centrally within the shield. The shield itself has a textured border, giving it a medieval or heraldic appearance. REPUBLIKA E SHQIPËRISË UNIVERSITETI "ISMAIL QEMALI" VLORË REKTORI Image /page/3/Picture/18 description: The image features a circular emblem with the letters 'UV' prominently displayed in the center. Surrounding the 'UV' are the words 'Virtus', 'Scientia', and 'Veritas', arranged in a circular fashion. Below the 'UV' and within the circle, the text 'Ismail Ogemu' is inscribed. The design appears to be a logo or seal, possibly representing an institution or organization. Vlorë më, 20 | 2 . 2024 **Lënda :** Ngarkohen për zbatimin e shkresës bashkëlidhur në respektim të legjislacionit përkatës në fuqi : **Drejtuar:** ➤ Administrator ✓ - • Drejtoria e Shërbimeve Mbështetëse - • Sektori i Financës dhe Realizimit të Buxhetit - • Sektori i Prokurimeve - • Sektori i Shërbimeve **REKTORI** **Prof. Dr. Aurela SALIAJ** Image /page/3/Picture/25 description: The image shows a circular stamp with text in Albanian. The text reads 'STAMP OF THE REPUBLIKAE SHQIPERIE - UNIVERSITY OF VLORE' and includes a date '2022'. The design features a circular emblem in the center with a star-like pattern.This takes more than 30 min (Total time: 2011.3281693458557) and it is analysing and describing in text the various images that appear in the document.
|
Running these heavy transformer models on my CPU-only server without an NVIDIA GPU leeds to a massive bottleneck: a single, complex, scanned PDF could take more than 15-30 minutes to parse and convert into clean Markdown. |
6. Running Local LLMs
I mentioned previously that self-hosted platforms, like AnythingLLM, Open WebUI, RAGFlow, PipesHub, etc. do not provide AI models. They act as the orchestration and database layer, but we must supply:
-
An Embedding Model to vectorize the documents.
-
An LLM Model to synthesize the retrieved context and formulate the response.
These models can be provided:
-
By purchasing a service (tokens) from providers like Google, OpenAI, Anthropic, and many others. Usually we provide the URL of the service, the API key, the name of the model, etc.
-
Running open-weights models locally, usually through Ollama.
I ignored the first option, because I don’t have any budged for this project, and focused my efforts on the second option: running open-weights models locally.
-
We already saw how to install Ollama (on the previous section):
# install and test ollama apt install -y curl ca-certificates curl -fsSL https://ollama.com/install.sh | sh systemctl status ollama ollama pull llama3.2:1b ollama pull gemma3:1b ollama list ollama run gemma3:1b -
Ollama is running as a service, and it can be accessed from other local applications (AnythingLLM etc.) at the url http://localhost:11434
If the application that needs to access a model through
ollamais installed on another host, we can makeollamaavailable through a reverse proxy. -
If the reverse proxy is not on the same host as
ollama, thenhttp://localhost:11434;should behttp://10.120.182.15:11434;(where10.120.182.15is the IP of the ollama host).In this case we should also make sure that the port
11434on the ollama host is open, and the ollama service is listening to any interface (by default it listens only to the local interface):-
Run:
systemctl edit ollama -
Add these lines to the config file:
[Service] Environment="OLLAMA_HOST=0.0.0.0" Environment="OLLAMA_ORIGINS=*" -
Restart the service:
systemctl daemon-reload systemctl restart ollama
-
-
To test it, we can use a
curlcommand like this:curl https://ollama.univlora.al/v1/chat/completions \ -H "Authorization: Bearer key1-v7gahShaiBise" \ -H "Content-Type: application/json" \ -d '{ "model": "gemma3:1b", "messages": [{"role": "user", "content": "Hello!"}] }'
7. Which Model to Use?
The machine that I can use for running local models is only an old Fujitsu PRIMERGY server without dedicated GPUs, so it has to rely entirely on CPU-based inference. Tweaking the settings to run local models as efficiently as possible is an art on its own, depending on NUMA topology of the server, CPUs, RAM allocations, etc.
For example the command numactl --hardware shows something like
this:
available: 2 nodes (0-1) node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 node 0 size: 55371 MB node 0 free: 53764 MB node 1 cpus: 14 15 16 17 18 19 20 21 22 23 24 25 26 27 node 1 size: 55396 MB node 1 free: 53873 MB node distances: node 0 1 0: 10 20 1: 20 10
Because CPU-based LLM inference is strictly memory-bandwidth bound (rather than CPU-compute bound), the RAM bandwidth is the single bottleneck that dictates the speed of token generation.
To measure the performance of the server we can use the benchmarking tool STREAM:
wget -q https://www.cs.virginia.edu/stream/FTP/Code/stream.c
gcc -O3 -fopenmp -mcmodel=large -DSTREAM_ARRAY_SIZE=100000000 -DNTIMES=20 stream.c -o stream
chmod +x stream
export OMP_NUM_THREADS=28
export OMP_PROC_BIND=spread
./stream
The output of ./stream:
Function Best Rate MB/s Avg time Min time Max time Copy: 45352.7 0.035442 0.035279 0.036387 Scale: 35568.3 0.045251 0.044984 0.046060 Add: 40922.0 0.059030 0.058648 0.059744 Triad: 40847.5 0.059010 0.058755 0.059488
Because the machine has 28 vCPUs split across 2 NUMA nodes, Ollama needs to be tuned so it doesn’t suffer from cross-socket memory bottlenecks:
-
Edit its configuration:
systemctl edit ollama -
Add this line under
[Service]:[Service] Environment="OLLAMA_NUM_THREADS=28" -
Restart:
systemctl daemon-reload systemctl restart ollama -
For large models (32B–70B) that need all of RAM, run Ollama normally so it spans both NUMA nodes:
ollama run qwen2.5:32b -
For smaller models, crossing the UPI bus between the two sockets adds unnecessary latency. Running Ollama pinned to a single NUMA node yields 15–20% faster token generation for 8B models:
# Force Ollama CLI to use only NUMA Node 0 (CPUs 0-13 and local Node 0 RAM) numactl --cpunodebind=0 --membind=0 ollama run llama3.1:8b
8. Broken Albanian Language
Our chatbot (RAG system) must understand questions and formulate highly precise answers in the Albanian language. This requirement immediately eliminates many of the most famous models.
From the tests that I did with feasible models (those that are able to run on my server, even slowly), I found out that none of them has sufficient skills in Albanian (especially when composing an answer).
This is where the project hits a wall, because no matter how well the other parts of the pipeline work (crawling the website, PDF procesing, etc.), the system will never be able to formulate a decent answer in Albanian.
So, the resources that are currently available, are not enough to completely self-host a project like this.
9. The True Cost of Self-Hosting
I wonder, if (hypothetically) I had no money restrictions, what would be the best open-weight models that perform well in Albanian? How much resources would they need to run properly? And how much would cost the hardware for hosting them?
10. Conclusions and Thoughts
Building a self-hosted RAG system for the university involves balancing several trade-offs. Given that all documentation and queries must be in Albanian, fully self-hosting open-weight models that write fluently in Albanian requires expensive hardware (GPUs and RAM) that is out of reach. Switching to cloud LLM providers (e.g., OpenAI or Google AI) is an other alternative, however evaluating their cost-to-performance ratio remains an open task.
Because I hit a wall on this part of the pipeline, and it became clear that this project is infeasible (at least for the time being), I was discouraged from exploring more options about the other parts of the system. And actually, to be honest, I did not have much time available to dig deeper — this whole attempt was done in a few weeks, and I had hoped to finish this project quickly.
Data quality also presented a major hurdle. The university website heavily relies on scanned PDFs, which complicate text extraction. Furthermore, automatically downloading the site’s entire 10-to-15-year archive runs the risk of feeding outdated policies into the RAG pipeline, diluting answer accuracy. Rather than an automated scraper, a manually curated list of current, official documents is a far safer and more effective approach.
In the short term, utilizing an off-the-shelf solution like NotebookLM (as described on the second section) offers the fastest path to value with minimal overhead. To make this approach effective, I recommend creating role-specific notebooks—such as separate, targeted notebooks for staff and students—rather than a single, monolithic knowledge base.