Skip to content

Patch 1 - #1

Open
HtetSec-0ps wants to merge 2 commits into
michaeljacholke:trunkfrom
HtetSec-0ps:patch-1
Open

Patch 1#1
HtetSec-0ps wants to merge 2 commits into
michaeljacholke:trunkfrom
HtetSec-0ps:patch-1

Conversation

@HtetSec-0ps

Copy link
Copy Markdown

"features": {
"ghcr.io/devcontainers/features/github-cli:1": {}
}

@HtetSec-0ps
HtetSec-0ps marked this pull request as draft July 29, 2026 16:34
@HtetSec-0ps
HtetSec-0ps marked this pull request as ready for review July 29, 2026 16:34
@HtetSec-0ps

Copy link
Copy Markdown
Author

internal/featuredetection/feature_detection.go

@HtetSec-0ps
HtetSec-0ps deleted the patch-1 branch July 29, 2026 20:40
@HtetSec-0ps
HtetSec-0ps restored the patch-1 branch July 29, 2026 20:40
@HtetSec-0ps
HtetSec-0ps deleted the patch-1 branch July 29, 2026 20:41
@HtetSec-0ps
HtetSec-0ps restored the patch-1 branch July 29, 2026 20:41
@HtetSec-0ps
HtetSec-0ps deleted the patch-1 branch July 29, 2026 20:41
@HtetSec-0ps
HtetSec-0ps restored the patch-1 branch July 29, 2026 20:41
@HtetSec-0ps
HtetSec-0ps deleted the patch-1 branch July 29, 2026 20:41
@HtetSec-0ps
HtetSec-0ps restored the patch-1 branch July 29, 2026 20:41
@HtetSec-0ps HtetSec-0ps reopened this Jul 29, 2026
@HtetSec-0ps
HtetSec-0ps deleted the patch-1 branch July 29, 2026 20:44
@HtetSec-0ps
HtetSec-0ps restored the patch-1 branch July 29, 2026 20:44
@HtetSec-0ps
HtetSec-0ps deleted the patch-1 branch July 29, 2026 20:46
@HtetSec-0ps
HtetSec-0ps restored the patch-1 branch July 29, 2026 20:46
@HtetSec-0ps
HtetSec-0ps deleted the patch-1 branch July 29, 2026 20:46
@HtetSec-0ps
HtetSec-0ps restored the patch-1 branch July 29, 2026 20:46
@HtetSec-0ps HtetSec-0ps reopened this Jul 29, 2026

@HtetSec-0ps HtetSec-0ps left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question / Problem Description
Hi everyone,

I am loving Marker for its incredible OCR and layout detection capabilities! However, I’ve run into a slight architectural bottleneck when trying to run the entire pipeline on a single local GPU setup alongside a local OpenAI-compatible LLM service (like LM Studio or Ollama for text correction).

During the process, Marker loads Surya, Texify, and other vision models into the VRAM. By the time it transitions to the LLM correction phase, these vision models are still occupying the VRAM entirely. This forces my local LLM to be completely offloaded to the CPU, making the text refinement phase extremely slow or leading to common OOM issues.

Since many single-GPU users face similar memory constraints, I wanted to humbly ask:

Is there already an existing workaround or a hidden configuration that allows Marker to dynamically unload/garbage-collect its vision models from the CUDA cache before initiating the LLM service API call? Or perhaps a way to run the LLM correction standalone? If so, I would deeply appreciate any guidance on how to achieve this!

If this isn't supported yet, could we consider adding a feature for this in future releases?
For example, either by explicitly invoking torch.cuda.empty_cache() before the LLM phase, or introducing a standalone post-processing command (e.g., allowing us to run the LLM refiner on already generated text.md and blocks.json).

I believe this would be incredibly helpful for the open-source community and users with budget/VRAM-limited hardware.

Thank you so much for your time and for maintaining this amazing project!

@HtetSec-0ps HtetSec-0ps closed this Aug 5, 2026
@HtetSec-0ps HtetSec-0ps reopened this Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants