{"contract":"financegpt.hf11.model-security-provenance-supply-chain-trust.v1","model":{"slug":"transformer-financegpt-semantic-general-v1","name":"all-MiniLM-L6-v2","repository_id":"sentence-transformers\/all-MiniLM-L6-v2","revision":"ea78891063587eb050ed4166b20062eaf978037c","task":"feature-extraction","artifact_sha256":"997404dcf8e7ea89cdf598ebab9594ec77c94a08f80861e4beece2c0d06d0b6d"},"optimization_capable":true,"supported_exports":["onnx"],"supported_quantization":["onnx-dynamic-int8","bitsandbytes-int8","bitsandbytes-nf4"],"dependencies":{"onnx_export":"python -m pip install \"transformers>=4.40\" \"optimum[onnxruntime]>=1.19\" \"onnx>=1.16\" \"onnxruntime>=1.17\" \"safetensors>=0.4\"","bitsandbytes":"python -m pip install \"transformers>=4.40\" \"accelerate>=0.30\" \"bitsandbytes>=0.43\" \"safetensors>=0.4\""},"recipes":{"onnx_export":"from optimum.onnxruntime import ORTModelForFeatureExtraction\nfrom transformers import AutoTokenizer\n\nrepo = \"sentence-transformers\/all-MiniLM-L6-v2\"\nrevision = \"ea78891063587eb050ed4166b20062eaf978037c\"\n\ntokenizer = AutoTokenizer.from_pretrained(\n    repo, revision=revision, trust_remote_code=False\n)\nmodel = ORTModelForFeatureExtraction.from_pretrained(\n    repo,\n    revision=revision,\n    export=True,\n    trust_remote_code=False,\n)\nmodel.save_pretrained(\".\/financegpt-onnx\")\ntokenizer.save_pretrained(\".\/financegpt-onnx\")\n\n# Record the FinanceGPT source artifact SHA-256 alongside this derived export.","onnx_dynamic_int8":"from pathlib import Path\nfrom optimum.onnxruntime import ORTQuantizer\nfrom optimum.onnxruntime.configuration import AutoQuantizationConfig\n\nmodel_dir = Path(\".\/financegpt-onnx\")\nquantizer = ORTQuantizer.from_pretrained(model_dir)\nqconfig = AutoQuantizationConfig.avx2(\n    is_static=False,\n    per_channel=False,\n)\nquantizer.quantize(\n    save_dir=\".\/financegpt-onnx-int8\",\n    quantization_config=qconfig,\n)\n\n# Benchmark and evaluate the quantized artifact before any publication request.","bitsandbytes_int8":"from transformers import AutoModel, AutoTokenizer, BitsAndBytesConfig\n\nrepo = \"sentence-transformers\/all-MiniLM-L6-v2\"\nrevision = \"ea78891063587eb050ed4166b20062eaf978037c\"\nquantization = BitsAndBytesConfig(load_in_8bit=True)\n\ntokenizer = AutoTokenizer.from_pretrained(\n    repo, revision=revision, trust_remote_code=False\n)\nmodel = AutoModel.from_pretrained(\n    repo,\n    revision=revision,\n    quantization_config=quantization,\n    device_map=\"auto\",\n    trust_remote_code=False,\n)\n\n# Load-time quantization is hardware dependent; benchmark on your target runtime.","bitsandbytes_nf4":"from transformers import AutoModel, BitsAndBytesConfig\nimport torch\n\nrepo = \"sentence-transformers\/all-MiniLM-L6-v2\"\nrevision = \"ea78891063587eb050ed4166b20062eaf978037c\"\nquantization = BitsAndBytesConfig(\n    load_in_4bit=True,\n    bnb_4bit_quant_type=\"nf4\",\n    bnb_4bit_compute_dtype=torch.bfloat16,\n)\nmodel = AutoModel.from_pretrained(\n    repo,\n    revision=revision,\n    quantization_config=quantization,\n    device_map=\"auto\",\n    trust_remote_code=False,\n)\n\n# NF4 is an optional developer-side runtime recipe, not a universal compatibility claim."},"lineage_manifest_template":{"source_repository":"sentence-transformers\/all-MiniLM-L6-v2","source_revision":"ea78891063587eb050ed4166b20062eaf978037c","source_artifact_sha256":"997404dcf8e7ea89cdf598ebab9594ec77c94a08f80861e4beece2c0d06d0b6d","derived_format":"onnx|onnx-dynamic-int8|runtime-quantized","derived_artifact_sha256":"<compute after export>","evaluation_reference":"<required before publication>","publication_is_promotion":false},"publication_checklist":["Keep the exact source repository and immutable revision.","Retain the source artifact SHA-256 when FinanceGPT has one.","Compute SHA-256 for every derived export or quantized artifact.","Benchmark on the actual target hardware; quantization is hardware sensitive.","Run model evaluation after conversion or quantization and before publication.","Publish only through an explicit governed publication action.","Never treat publication as production promotion or QLM rebinding."],"governance":{"recipe_only":true,"server_side_export_jobs":false,"server_side_quantization_jobs":false,"server_side_dependency_installation":false,"trust_remote_code":false,"automatic_export_publication":false,"automatic_quantized_artifact_publication":false,"automatic_model_promotion":false,"automatic_qlm_rebinding":false,"financial_actions_authority":false,"task":"feature-extraction"}}