Skip to content

V0.2 distribution and summarizer - #86

Merged
e2hln merged 2 commits into
GenAI-Security-Project:v0.2from
eaglei15:v0.2-distribution-and-summarizer
Jul 20, 2026
Merged

V0.2 distribution and summarizer#86
e2hln merged 2 commits into
GenAI-Security-Project:v0.2from
eaglei15:v0.2-distribution-and-summarizer

Conversation

@eaglei15

Copy link
Copy Markdown
Collaborator

No description provided.

eaglei15 added 2 commits July 20, 2026 13:30
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
@e2hln
e2hln merged commit fa5fb67 into GenAI-Security-Project:v0.2 Jul 20, 2026
1 check passed
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