shibatch commited on
Commit
09a98ad
·
verified ·
1 Parent(s): 2a91759

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +16 -0
README.md CHANGED
@@ -291,6 +291,7 @@ tokenizer = AutoTokenizer.from_pretrained(model_dir)
291
  model = AutoModelForCausalLM.from_pretrained(
292
  model_dir,
293
  dtype=torch.float32,
 
294
  ).to(device)
295
  model.eval()
296
 
@@ -339,6 +340,21 @@ The optional `flash-linear-attention` and `causal-conv1d` packages are not
339
  required. Without them, Transformers uses its PyTorch Gated DeltaNet fallback,
340
  which is the path used to train and validate this checkpoint.
341
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
342
  ## Intended uses
343
 
344
  This model is intended for:
 
291
  model = AutoModelForCausalLM.from_pretrained(
292
  model_dir,
293
  dtype=torch.float32,
294
+ experts_implementation="batched_mm",
295
  ).to(device)
296
  model.eval()
297
 
 
340
  required. Without them, Transformers uses its PyTorch Gated DeltaNet fallback,
341
  which is the path used to train and validate this checkpoint.
342
 
343
+ The examples explicitly select `experts_implementation="batched_mm"`. The
344
+ model's routed experts have an intermediate width of 54, while the default
345
+ PyTorch `grouped_mm` CUDA path in some recent Torch/Transformers combinations
346
+ requires expert matrix strides to be multiples of 16 bytes. Without the
347
+ explicit compatible implementation, loading succeeds but the first forward
348
+ pass can fail with:
349
+
350
+ ```text
351
+ RuntimeError: strides should be multiple of 16 bytes
352
+ ```
353
+
354
+ `batched_mm` evaluates the same expert weights without that grouped-kernel
355
+ layout restriction. `experts_implementation="eager"` is also a compatible,
356
+ slower fallback.
357
+
358
  ## Intended uses
359
 
360
  This model is intended for: