V0.2 distribution and summarizer - #86
Merged
e2hln merged 2 commits intoJul 20, 2026
Merged
Conversation
Add two format-agnostic, repo-level distribution attributes extracted from
the HuggingFace file listing:
* model_file_size — total bytes of all weight files
* runtime_requirement — "python" (safetensors/PyTorch/etc. loadable from a
Python ML stack) or "llm-stack" (GGUF/GGML-only,
needs llama.cpp/Ollama)
- model_file_extractors.py: new extract_distribution_metadata() runs for every
repo regardless of weight format
- extractor.py: wire into EnhancedExtractor (REPOSITORY_FILES / HIGH confidence)
- service.py: emit as CycloneDX properties under the custom
owasp:aibom:distribution namespace (kept out of the official genai:aibom
namespace, which forbids unofficial names)
- field_registry.json: register both as supplementary-tier fields
- result.html: render a friendly "Deployment & Hardware" section
…backend - Switch summarization model from google/flan-t5-small to facebook/bart-large-cnn - Fix prompt-leak bug: BART is a summarization model, not instruction-following. Feed it document text only (never an instruction prompt), which it would otherwise echo into the output and hallucinate generic summaries. Add _strip_prompt_leak() as defense-in-depth - Add optional instruction-tuned backend via Ollama (AIBOM_SUMMARIZER_BACKEND=ollama), falling back to BART on any failure - Guard against BART hallucination on short inputs (<280 chars): return the clean extract instead of abstracting - Penalize quant-repackaging marketing text; strip markdown emphasis/headings; add no_repeat_ngram_size to stop repetition loops
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.