Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llama : fix segfault from unknown model arch name #5820

Merged

Commits on Mar 2, 2024

  1. Configuration menu
    Copy the full SHA
    3b257f8 View commit details
    Browse the repository at this point in the history
  2. llama : make all LLM maps const

    This also requires using `std::map::at` instead of its `operator[]`
    which does not exist for const maps.
    
    * llama : name LLM_ARCH_UNKNOWN to "(unknown)"
    
    This avoids errors from `std::map::at` when
    getting the general name of the model architecture.
    Using "(unknown)" instead of an empty string as per suggestion
    ggerganov#5820 (comment)
    compilade committed Mar 2, 2024
    Configuration menu
    Copy the full SHA
    6cf481b View commit details
    Browse the repository at this point in the history
  3. llama : remove redundant inner const for LLM_TENSOR_NAMES

    The extra const won't do anything here as const maps
    return const references to values.
    
    Co-authored-by: Jared Van Bortel <cebtenzzre@gmail.com>
    compilade and cebtenzzre committed Mar 2, 2024
    Configuration menu
    Copy the full SHA
    44e33d4 View commit details
    Browse the repository at this point in the history
  4. llama : remove redundant nullptr check in llm_arch_from_string

    Since LLM_ARCH_NAMES is a const map, no spurious elements
    with a NULL name are inserted anymore, so this check is dead code.
    compilade committed Mar 2, 2024
    Configuration menu
    Copy the full SHA
    d8f7064 View commit details
    Browse the repository at this point in the history