RWKV7
Collection
Receptance Weighted Key Value architecture • 2 items • Updated
How to use keras/rwkv7_g1a_0.3b with KerasHub:
import keras_hub
# Load CausalLM model (optional: use half precision for inference)
causal_lm = keras_hub.models.CausalLM.from_preset("hf://keras/rwkv7_g1a_0.3b", 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/rwkv7_g1a_0.3b")
How to use keras/rwkv7_g1a_0.3b 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/rwkv7_g1a_0.3b")
This is a RWKV7 model uploaded using the KerasHub library and can be used with JAX, TensorFlow, and PyTorch backends.
Model config:
This model card has been generated automatically and should be completed by the model author. See Model Cards documentation for more information.