jburtoft commited on
Commit
fe56ace
·
1 Parent(s): 3dee2fa

README: KernelConfig usage with version/trust_remote_code

Browse files
Files changed (1) hide show
  1. README.md +5 -2
README.md CHANGED
@@ -45,7 +45,10 @@ import torch
45
  from transformers import AutoModel, KernelConfig
46
 
47
  kernel_config = KernelConfig({
48
- "VJEPA2Encoder": "aws-neuron/vjepa2-neuron-kernels:NeuronVJEPA2Encoder",
 
 
 
49
  })
50
  model = AutoModel.from_pretrained(
51
  "facebook/vjepa2-vitl-fpc64-256",
@@ -107,7 +110,7 @@ exhaustion; details in the source repository's cycle records.
107
  * **Hardware**: trn2 (verified on trn2.3xlarge, LNC=2).
108
  * **SDK**: neuronx-cc 2.27.2878.0; torch-neuronx 2.11.3 (PyTorch Native); nki 0.6.0;
109
  nkilib (bundled with the SDK — `ModularAllocator` is imported from it).
110
- * **Transformers** with `KernelConfig` support; `kernels` library.
111
  * `NKI_ENABLE_TRACE_CACHE=0` in the environment (the runtime defaults the cross-process trace
112
  cache on; a stale NEFF silently captures a different instruction stream).
113
 
 
45
  from transformers import AutoModel, KernelConfig
46
 
47
  kernel_config = KernelConfig({
48
+ "VJEPA2Encoder": (
49
+ "aws-neuron/vjepa2-neuron-kernels:NeuronVJEPA2Encoder",
50
+ {"version": 1, "trust_remote_code": True},
51
+ ),
52
  })
53
  model = AutoModel.from_pretrained(
54
  "facebook/vjepa2-vitl-fpc64-256",
 
110
  * **Hardware**: trn2 (verified on trn2.3xlarge, LNC=2).
111
  * **SDK**: neuronx-cc 2.27.2878.0; torch-neuronx 2.11.3 (PyTorch Native); nki 0.6.0;
112
  nkilib (bundled with the SDK — `ModularAllocator` is imported from it).
113
+ * **Transformers** `>= 5.14` (tuple-form `KernelConfig`); `kernels >= 0.17`.
114
  * `NKI_ENABLE_TRACE_CACHE=0` in the environment (the runtime defaults the cross-process trace
115
  cache on; a stale NEFF silently captures a different instruction stream).
116