Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

keras
/
llama2_instruct_7b_en

Text Generation
KerasHub
Keras
English
Model card Files Files and versions
xet
Community

Instructions to use keras/llama2_instruct_7b_en with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • KerasHub

    How to use keras/llama2_instruct_7b_en with KerasHub:

    import keras_hub
    
    # Load CausalLM model (optional: use half precision for inference)
    causal_lm = keras_hub.models.CausalLM.from_preset("hf://keras/llama2_instruct_7b_en", dtype="bfloat16")
    causal_lm.compile(sampler="greedy")  # (optional) specify a sampler
    
    # Generate text
    causal_lm.generate("Keras: deep learning for", max_length=64)
    
    import keras_hub
    
    # Create a Backbone model unspecialized for any task
    backbone = keras_hub.models.Backbone.from_preset("hf://keras/llama2_instruct_7b_en")
    
  • Keras

    How to use keras/llama2_instruct_7b_en with Keras:

    # Available backend options are: "jax", "torch", "tensorflow".
    import os
    os.environ["KERAS_BACKEND"] = "jax"
    
    import keras
    
    model = keras.saving.load_model("hf://keras/llama2_instruct_7b_en")
    
  • Notebooks
  • Google Colab
  • Kaggle
llama2_instruct_7b_en
27 GB
Ctrl+K
Ctrl+K
  • 3 contributors
History: 14 commits
Divyasreepat's picture
Divyasreepat
Upload folder using huggingface_hub
79441aa verified 11 months ago
  • assets
    Upload folder using huggingface_hub 11 months ago
  • .gitattributes
    1.59 kB
    Upload folder using huggingface_hub 11 months ago
  • README.md
    6.6 kB
    Update README.md with new model card content about 1 year ago
  • config.json
    741 Bytes
    Upload folder using huggingface_hub 11 months ago
  • metadata.json
    215 Bytes
    Upload folder using huggingface_hub 11 months ago
  • model.weights.h5
    13.5 GB
    xet
    Upload folder using huggingface_hub over 1 year ago
  • model.weights.json
    31.5 kB
    Upload folder using huggingface_hub 11 months ago
  • model_00000.weights.h5
    10.7 GB
    xet
    Upload folder using huggingface_hub 11 months ago
  • model_00001.weights.h5
    2.74 GB
    xet
    Upload folder using huggingface_hub 11 months ago
  • preprocessor.json
    1.42 kB
    Upload folder using huggingface_hub 11 months ago
  • task.json
    2.92 kB
    Upload folder using huggingface_hub 11 months ago
  • tokenizer.json
    591 Bytes
    Upload folder using huggingface_hub over 1 year ago