Skip to content

pangoling

Access to Large Language Model Predictions

v1.0.3 · Apr 7, 2025 · MIT + file LICENSE

Description

Provides access to word predictability estimates using large language models (LLMs) based on 'transformer' architectures via integration with the 'Hugging Face' ecosystem <https://huggingface.co/>. The package interfaces with pre-trained neural networks and supports both causal/auto-regressive LLMs (e.g., 'GPT-2') and masked/bidirectional LLMs (e.g., 'BERT') to compute the probability of words, phrases, or tokens given their linguistic context. For details on GPT-2 and causal models, see Radford et al. (2019) <https://storage.prod.researchhub.com/uploads/papers/2020/06/01/language-models.pdf>, for details on BERT and masked models, see Devlin et al. (2019) <doi:10.48550/arXiv.1810.04805>. By enabling a straightforward estimation of word predictability, the package facilitates research in psycholinguistics, computational linguistics, and natural language processing (NLP).

Downloads

608

Last 30 days

6504th

1.9K

Last 90 days

7.1K

Last year

Trend: -7.7% (30d vs prior 30d)

CRAN Check Status

1 ERROR
13 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 ERROR
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (1 non-OK)
ERROR r-patched-linux-x86_64

re-building of vignette outputs

Error(s) in re-building vignettes:
  ...
--- re-building ‘example.Rmd’ using rmarkdown
--- finished re-building ‘example.Rmd’

--- re-building ‘intro-bert.Rmd’ using rmarkdown
--- finished re-building ‘intro-bert.Rmd’

--- re-building ‘intro-gpt2.Rmd’ using rmarkdown
--- finished re-building ‘intro-gpt2.Rmd’

--- re-building ‘troubleshooting.Rmd’ using rmarkdown

Quitting from troubleshooting.Rmd:90-92 [unnamed-chunk-8]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error:
! /home/hornik/tmp/scratch/check-CRAN-regular-hornik/cache/R/reticulate/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/libpython3.12.so - /home/hornik/tmp/scratch/check-CRAN-regular-hornik/cache/R/reticulate/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/libpython3.12.so: cannot enable executable stack as shared object requires: Invalid argument
---
Backtrace:
    ▆
 1. └─reticulate::py_config()
 2.   └─reticulate:::ensure_python_initialized()
 3.     └─reticulate:::initialize_python()
 4.       └─base::tryCatch(...)
 5.         └─base (local) tryCatchList(expr, classes, parentenv, handlers)
 6.           └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
 7.             └─value[[3L]](cond)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: processing vignette 'troubleshooting.Rmd' failed with diagnostics:
/home/hornik/tmp/scratch/check-CRAN-regular-hornik/cache/R/reticulate/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/libpython3.12.so - /home/hornik/tmp/scratch/check-CRAN-regular-hornik/cache/R/reticulate/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/libpython3.12.so: cannot enable executable stack as shared object requires: Invalid argument
--- failed re-building ‘troubleshooting.Rmd’

SUMMARY: processing the following file failed:
  ‘troubleshooting.Rmd’

Error: Vignette re-building failed.
Execution halted

Check History

ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 24, 2026
ERROR r-devel-linux-x86_64-debian-gcc

re-building of vignette outputs

Error(s) in re-building vignettes:
  ...
--- re-building ‘example.Rmd’ using rmarkdown
--- finished re-building ‘example.Rmd’

--- re-building ‘intro-bert.Rmd’ using rmarkdown
--- finished re-building ‘intro-bert.Rmd’

--- re-building ‘intro-gpt2.Rmd
...[truncated]...
.so: cannot enable executable stack as shared object requires: Invalid argument
--- failed re-building ‘troubleshooting.Rmd’

SUMMARY: processing the following file failed:
  ‘troubleshooting.Rmd’

Error: Vignette re-building failed.
Execution halted
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Dependency Network

Dependencies Reverse dependencies cachem data.table memoise reticulate rstudioapi tidyselect tidytable pangoling

Version History

new 1.0.3 Mar 10, 2026