Model Fingerprinting and License Compliance: How to Verify a Model's Base Provenance

    This article explains how observable model features—especially the tokenizer—can reveal a model's true base provenance, why "continued pre-training plus reinforcement learning" does not imply an in-house base model, and what obligations arise when the base model uses a conditional open-source license. It includes a minimal fingerprinting probe, a four-step compliance workflow, a sample provenance checklist, and practical selection and disclosure guidance for both model consumers and publishers.

    1. The Core Issue: From a Leaked Model ID to Verifiable Base Provenance

    A frequently discussed case in the industry goes like this: while capturing API requests from an AI coding tool, a developer noticed that the model identifier in the response body was not the name the vendor used in its marketing, but an internal identifier carrying version, training-stage, and inference-optimization suffixes. Researchers then pointed out that the model’s vocabulary segmentation behavior matched a known open-source model exactly, which allowed them to infer its base source. The vendor’s release notes mentioned only “continued pre-training on a base model combined with reinforcement learning,” without disclosing which base model it was.

    The technical core here is independent of any specific product and can be abstracted into three general questions:

    1. How a model’s identity can be reverse-engineered from observable features (model fingerprinting);
    2. Why the common training paradigm of “continued pre-training + reinforcement learning” naturally obscures the base source;
    3. What obligations a commercial product must fulfill when the base model uses a conditional open-source license.

    2. Model Fingerprinting: Why the Tokenizer Is the Strongest Identity Marker

    Among all observable features, the tokenizer is the most stable and the hardest to disguise, for three reasons.

    First, the vocabulary is an asset frozen before training. Continued pre-training and post-training typically reuse the original vocabulary and embedding mapping; changing the vocabulary means changing the embedding matrix dimensions and realigning all parameters, which is extremely costly.

    Second, segmentation behavior exposes a large number of observable edge cases. Differences in the token sequences produced for the same text under different tokenizers are especially visible with numbers, code symbols, mixed multilingual text, emoji, and whitespace characters.

    Third, token sequences can be read indirectly through an API’s usage counts. Many APIs return input and output token counts, so an attacker only needs to construct probe texts and compare whether the counts match those of candidate tokenizers.

    A minimal fingerprinting probe idea (illustrative, independent of any specific API):

    1. # Build a set of "high-distinction" probes: digit strings, code symbols,
    2. # mixed Chinese-English text, and emoji
    3. probes = [
    4. "1234567890123456789",
    5. "def f(x: int)->dict[str,float]: return {}",
    6. "模型 tokenizer 混排 test_case",
    7. "🙂🙃🧩",
    8. " leading and trailing ",
    9. ]
    10. def fingerprint(counts):
    11. # counts: the sequence of input token counts for each probe
    12. return tuple(counts)
    13. # Encode each candidate tokenizer and compare whether the count
    14. # sequences match exactly
    15. # The probability of an exact match drops exponentially with the number of probes

    Beyond the tokenizer, commonly used auxiliary fingerprints include the naming and position of special control tokens, the boundary markers of the chat template, numerical distribution characteristics of logprobs, and sampling preferences under a fixed random seed. In engineering practice, an exact match on tokenizer counts is treated as strong evidence, while the other features serve as cross-validation.

    3. Continued Pre-Training and RL: Why “No Mention of the Base” Does Not Mean “In-House Base”

    The path to modern model capability is typically layered:

    • Base pre-training: learning general representations on massive corpora, the most expensive stage;
    • Continued pre-training: further training on domain corpora to inject capabilities such as code, math, and long context;
    • Post-training: supervised fine-tuning to align formats, and reinforcement learning (RL) to optimize preferences and verifiable rewards, such as whether code passes unit tests.

    The key point is that both later stages assume they are “standing on some base.” Therefore, “we did continued pre-training and reinforcement learning” and “the base comes from a third party” can be logically true at the same time. The reliable basis for judging the base source is not the marketing narrative, but the fingerprint evidence described above and the status of license obligations.

    4. Conditional Open-Source Licenses: Determining Commercial Use and Compliance Actions

    Some models use licenses that are “permissive but conditional”: commercial use and modification are allowed, but once a commercial product reaches a certain scale (for example, monthly active users or monthly revenue above a threshold), the base model name must be prominently displayed in the user interface. Compliance judgment for such clauses can be broken into four steps:

    1. Obligation identification: confirm the license type, additional conditions, trigger thresholds, and attribution format requirements;
    2. Scale assessment: evaluate whether the thresholds are triggered using active users and revenue as measures, noting whether group-level figures and affiliated products are counted together;
    3. Attribution implementation: display it prominently on the About page, in a model information panel, or in a first-use prompt, rather than burying it deep in documentation;
    4. Evidence retention: keep the license text version, dependency list, and compliance review records to form a traceable chain.

    An illustrative compliance checklist structure:

    1. model_provenance:
    2. base_model: "<base model name and version>"
    3. license: "<license type>"
    4. license_obligations:
    5. - attribution_required: true
    6. - threshold_triggered: true
    7. attribution_surface: ["about_page", "model_info_panel"]
    8. review_record: "<review ticket number/date>"

    5. Selection and Risk Control Advice for Consumers

    For enterprises and developers choosing AI coding tools or third-party model services, it is worth focusing on:

    • Source transparency: whether the base model, license, and data usage policy are disclosed;
    • Compliance verifiability: whether an explanation of license obligation fulfillment can be provided;
    • Data boundaries: whether code is used for training and whether data retention can be turned off;
    • Replaceability: whether the API is compatible with common protocols, avoiding lock-in to a single vendor;
    • Observability: whether unified logging, monitoring and alerting, and usage metering are integrated, making auditing and cost attribution easier.

    6. Disclosure and Engineering Practices for Model Publishers

    If an enterprise builds on an open-source base and offers a service externally, it is advisable to make compliance part of the pipeline: generate a software bill of materials at build time and automatically match license policies; add attribution checks to release gates; and deliver compliance text uniformly at runtime through a configuration center and container platform. In such scenarios, Baidu AI Cloud is typically used to provide general capabilities such as model hosting, log auditing, and monitoring and alerting; the specific implementation should follow the official documentation.

    7. Conclusion

    Model fingerprinting turns “base provenance” from a PR talking point into a verifiable technical fact, and license obligations determine that once this fact is verified, a commercial product must bear the cost of attribution and compliance. For developers, the real risk is not being discovered, but failing to build source traceability and license compliance into engineering constraints from the very beginning of architecture design.