Text Generation
Transformers
Safetensors
English
gemma
jepa
world-models
omnimodal
arc-challenge
mmlu
gsm8k
image-generation
video-generation
audio-generation
Mixture of Experts
sparse-moe
punica
dag-reasoning
compiler-safety
os-computer-use
casp15
structural-biology
custom_code
text-generation-inference
Instructions to use clevrpwn/gmma-jepa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use clevrpwn/gmma-jepa with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="clevrpwn/gmma-jepa", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("clevrpwn/gmma-jepa", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("clevrpwn/gmma-jepa", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use clevrpwn/gmma-jepa with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "clevrpwn/gmma-jepa" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "clevrpwn/gmma-jepa", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/clevrpwn/gmma-jepa
- SGLang
How to use clevrpwn/gmma-jepa with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "clevrpwn/gmma-jepa" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "clevrpwn/gmma-jepa", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "clevrpwn/gmma-jepa" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "clevrpwn/gmma-jepa", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use clevrpwn/gmma-jepa with Docker Model Runner:
docker model run hf.co/clevrpwn/gmma-jepa
| """ | |
| Configuration for Gmma-JEPA model by Danger Labs. | |
| """ | |
| from transformers.configuration_utils import PretrainedConfig | |
| class GmmaJEPAConfig(PretrainedConfig): | |
| model_type = "gmma-jepa" | |
| keys_to_ignore_at_inference = ["past_key_values"] | |
| def __init__( | |
| self, | |
| vocab_size=256000, | |
| hidden_size=1536, | |
| intermediate_size=4096, | |
| num_hidden_layers=18, | |
| num_attention_heads=8, | |
| num_key_value_heads=1, | |
| head_dim=192, | |
| hidden_act="gelu_pytorch_tanh", | |
| max_position_embeddings=8192, | |
| initializer_range=0.02, | |
| rms_norm_eps=1e-6, | |
| use_cache=True, | |
| pad_token_id=0, | |
| bos_token_id=2, | |
| eos_token_id=1, | |
| tie_word_embeddings=True, | |
| rope_theta=10000.0, | |
| num_jepa_layers=8, | |
| dag_reasoning_enabled=True, | |
| universal_compiler_safety=True, | |
| num_swarm_specialists=23, | |
| **kwargs, | |
| ): | |
| super().__init__( | |
| pad_token_id=pad_token_id, | |
| bos_token_id=bos_token_id, | |
| eos_token_id=eos_token_id, | |
| tie_word_embeddings=tie_word_embeddings, | |
| **kwargs, | |
| ) | |
| self.vocab_size = vocab_size | |
| self.max_position_embeddings = max_position_embeddings | |
| self.hidden_size = hidden_size | |
| self.intermediate_size = intermediate_size | |
| self.num_hidden_layers = num_hidden_layers | |
| self.num_attention_heads = num_attention_heads | |
| self.head_dim = head_dim | |
| self.num_key_value_heads = num_key_value_heads | |
| self.hidden_act = hidden_act | |
| self.initializer_range = initializer_range | |
| self.rms_norm_eps = rms_norm_eps | |
| self.use_cache = use_cache | |
| self.rope_theta = rope_theta | |
| self.num_jepa_layers = num_jepa_layers | |
| self.dag_reasoning_enabled = dag_reasoning_enabled | |
| self.universal_compiler_safety = universal_compiler_safety | |
| self.num_swarm_specialists = num_swarm_specialists | |