Package: zulm 0.1.0
zulm: Tensor Graphs, Training and Inference on 'ggml'
Builds computation graphs of tensors in R, runs them on the central processing unit (CPU), differentiates them and trains their parameters, through the 'ggml' tensor library (<https://github.com/ggml-org/ggml>) bundled in its CPU subset. Graphs are built once per input shape and run many times; the same operations train small and medium neural networks with the AdamW (Loshchilov and Hutter (2019) <doi:10.48550/arXiv.1711.05101>) and stochastic gradient descent (SGD) optimisers, and run pretrained transformer checkpoints read from safetensors files or from GGUF files, the model file format of 'ggml'. Results reproduce bit for bit at a fixed seed whatever the thread count. A versioned C interface lets other packages build models on top.
Authors:
zulm_0.1.0.tar.gz
zulm_0.1.0.zip(r-4.7-x86_64)zulm_0.1.0.zip(r-4.7-arm64)zulm_0.1.0.zip(r-4.6-x86_64)zulm_0.1.0.zip(r-4.6-arm64)zulm_0.1.0.zip(r-4.5-x86_64)
zulm_0.1.0.tgz(r-4.6-x86_64)zulm_0.1.0.tgz(r-4.6-arm64)zulm_0.1.0.tgz(r-4.5-x86_64)zulm_0.1.0.tgz(r-4.5-arm64)
zulm_0.1.0.tar.gz(r-4.7-arm64)zulm_0.1.0.tar.gz(r-4.7-x86_64)zulm_0.1.0.tar.gz(r-4.6-arm64)zulm_0.1.0.tar.gz(r-4.6-x86_64)
zulm_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
zulm/json (API)
| # Install 'zulm' in R: |
| install.packages('zulm', repos = c('https://pedrobtz.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/pedrobtz/zulm/issues
Pkgdown/docs site:https://pedrobtz.github.io
Last updated from:b9a52d74e8. Checks:15 OK. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-arm64 | OK | 150 | ||
| linux-devel-x86_64 | OK | 307 | ||
| source / vignettes | OK | 298 | ||
| linux-release-arm64 | OK | 195 | ||
| linux-release-x86_64 | OK | 298 | ||
| macos-release-arm64 | OK | 140 | ||
| macos-release-x86_64 | OK | 425 | ||
| macos-oldrel-arm64 | OK | 145 | ||
| macos-oldrel-x86_64 | OK | 294 | ||
| windows-devel-arm64 | OK | 450 | ||
| windows-devel-x86_64 | OK | 380 | ||
| windows-release-arm64 | OK | 405 | ||
| windows-release-x86_64 | OK | 208 | ||
| windows-oldrel-x86_64 | OK | 327 | ||
| wasm-release | OK | 125 |
Exports:zl_abszl_adalnzl_adamwzl_arrow_batcheszl_attentionzl_blockzl_castzl_causal_maskzl_clampzl_concatzl_contzl_coszl_cross_entropyzl_crossprodzl_cumsumzl_embeddingzl_expzl_flash_attentionzl_forwardzl_geluzl_get_rowszl_gradzl_graphzl_graph_cachezl_graph_infozl_init_normalzl_init_oneszl_init_uniformzl_init_zeroszl_intzl_layer_normzl_linearzl_loadzl_load_safetensorszl_logzl_maezl_mean_rowszl_mlpzl_msezl_nextzl_noise_normalzl_noise_uniformzl_normzl_padzl_paramzl_param_countzl_param_getzl_param_nameszl_param_setzl_param_tensorzl_paramszl_permutezl_reluzl_resetzl_reshapezl_rms_normzl_rng_normalzl_rng_uniformzl_ropezl_safetensors_readzl_savezl_save_safetensorszl_scalezl_seedzl_sgdzl_sigmoidzl_siluzl_sinzl_softmaxzl_softpluszl_sqrzl_sqrtzl_statezl_state_getzl_state_setzl_state_writezl_stepzl_sumzl_sum_rowszl_swigluzl_tzl_tanhzl_threadszl_time_embeddingzl_trainerzl_trainer_loadzl_trainer_savezl_trizl_viewzl_wherezulm_info
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| Optimisers | zl_adamw zl_sgd |
| Batches from Arrow streams | print.zl_arrow_batches zl_arrow_batches zl_next |
| Convert a tensor's type | zl_cast |
| Flash attention | zl_flash_attention |
| Build and run graphs | zl_forward zl_graph zl_graph_info zl_int |
| Graphs built once per input shape | print.zl_graph_cache zl_graph_cache |
| Initialisers for parameters | zl_init_normal zl_init_ones zl_init_uniform zl_init_zeros |
| Random draws inside a graph | zl_noise_normal zl_noise_uniform |
| Parameter stores | zl_param zl_params zl_param_count zl_param_get zl_param_names zl_param_set zl_param_tensor |
| Random draws, in R | zl_rng_normal zl_rng_uniform |
| safetensors files | zl_load_safetensors zl_safetensors_read zl_save_safetensors |
| Save and load parameters as GGUF | zl_load zl_save |
| The session's random-number key | zl_seed |
| State tensors | zl_state zl_state_get zl_state_set zl_state_write |
| Threads | zl_threads |
| Train a graph | zl_grad zl_step zl_trainer |
| Save, load and reset a trainer's optimiser state | zl_reset zl_trainer_load zl_trainer_save |
| Arithmetic, reductions and elementwise functions on tensors | zl-arith zl_abs zl_cos zl_cumsum zl_exp zl_gelu zl_log zl_mean_rows zl_relu zl_scale zl_sigmoid zl_silu zl_sin zl_softplus zl_sqr zl_sqrt zl_sum zl_sum_rows zl_swiglu zl_tanh |
| Attention pieces and normalisation | zl-attention zl_causal_mask zl_layer_norm zl_rms_norm zl_rope zl_softmax |
| Losses | zl-loss zl_cross_entropy zl_mae zl_mse |
| Modules | zl-modules zl_adaln zl_attention zl_block zl_embedding zl_linear zl_mlp zl_norm zl_time_embedding |
| Selection, clipping and triangles | zl-select zl_clamp zl_tri zl_where |
| Products and shapes of tensors | zl-shape zl_concat zl_cont zl_crossprod zl_get_rows zl_pad zl_permute zl_reshape zl_t zl_view |
| Build and runtime information | zulm_info |
| Conditions signalled by zulm | zulm-conditions |
