# knowledge-graph-extractor

> Turn any document or a whole zip into an interactive knowledge graph, using a self-hosted Qwen3.6-35B-A3B-MTP on a single NVIDIA L4

- **Category:** Knowledge Management
- **Licence:** MIT
- **Open source:** oss
- **Languages:** Python
- **Platforms:** Docker Compose
- **Tags:** LLM, Gpu, Knowledge Graph, Deduplication, Docker, Fastapi, Self Hosted, Qwen, Entity extraction, Llama Cpp, Force Graph, Information Extraction, Triples

## Description

Knowledge Graph Extractor is a self-hosted application that converts unstructured text — pasted content, fetched URLs, or zip archives of documents — into an interactive knowledge graph. It uses a self-hosted Qwen3.6-35B-A3B-MTP model running on llama.cpp with CUDA on a single NVIDIA L4 24GB GPU. The pipeline chunks oversized documents instead of truncating, extracts atomic (subject, predicate, object) triples with canonicalized entities, applies optional semantic deduplication via jina-embeddings-v5-text-nano on CPU, and visualizes the resulting graph in a force-directed UI where edges show evidence spans and confidence scores. A single-slot job scheduler with foreground preemption and auto-backfill persists jobs to disk so they survive restarts. Results can be downloaded as JSONL. The stack runs via Docker Compose with two services: llama-server (port 8080) serving the OpenAI-compatible LLM API, and a FastAPI app (port 3000) handling extraction, scheduling, deduplication, and the UI. Configuration is via a .env file requiring a Jina AI API key for URL-to-markdown conversion. The project is MIT-licensed with no paid tiers.

## Links

- [Homepage](https://github.com/hanxiao/knowledge-graph-extractor)
- [Website](https://hanxiao.io/knowledge-graph)
- [GitHub Repository](https://github.com/hanxiao/knowledge-graph-extractor)

---
Source: https://selfhost.directory/project/knowledge-graph-extractor