Skip to main content

Po-Lang — Native LLM + ML + HTTP gateway programming language engine

Project description

Po-Lang Engine v2.4.0

A high-performance programming language with native AI/ML + LLM training engine.

pip install po-lang-engine
pop run script.po

v2.4.0 — Native LLM Training Engine

Train language models directly in Po-Lang scripts — no Python glue code needed.

Size Model Speed Use case
"nano" N-gram (n=4) Instant Quick text generation
"micro" CharRNN 64-dim Pure Python Any device (Termux)
"small" CharRNN 256-dim numpy 30x Fast training
use ai
use net
import sys

keep llm = ai.LLM("micro")

if sys.exists("models/lang.po_model") {
    llm["load"]("models/lang.po_model")
    sys.stdout("[LLM] Model loaded!\n")
} else {
    keep corpus = "Po-Lang is a fast language. Po-Lang runs anywhere."
    llm["train"](corpus, 50)
    llm["save"]("models/lang.po_model")
}

keep text = llm["generate"]("Po-Lang", 100, 0.8)
show text

HTTP AI Gateway

keep server = net.listen(8080)
server["route"]("GET", "/generate", fn(req) {
    keep prompt = req["query"]("prompt")
    keep text   = llm["generate"](prompt, 150, 0.8)
    return "{ 'generated': '" + text + "' }"
})
server["start"]()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

po_lang_engine-2.4.0.tar.gz (34.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

po_lang_engine-2.4.0-py3-none-any.whl (40.1 kB view details)

Uploaded Python 3

File details

Details for the file po_lang_engine-2.4.0.tar.gz.

File metadata

  • Download URL: po_lang_engine-2.4.0.tar.gz
  • Upload date:
  • Size: 34.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for po_lang_engine-2.4.0.tar.gz
Algorithm Hash digest
SHA256 157803fcc9f09e6fb567aacd2c9217a7c6d2367834bbe1d4574393e16196b54e
MD5 c24a25fb5aa0f6af3faa95862c518a6b
BLAKE2b-256 454a23570607624983235b8a0a10969e3b04cd807095bb6363f38962d644f132

See more details on using hashes here.

File details

Details for the file po_lang_engine-2.4.0-py3-none-any.whl.

File metadata

  • Download URL: po_lang_engine-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 40.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for po_lang_engine-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f2f83161ccdc879e2e6ebc722afa720fd6e92893e56b2933c2ea9fdd6bd32b0
MD5 df570378ea350644d5205e24aa280d15
BLAKE2b-256 b00bc02f3b3dd13d2fce1179e68e5f50b3f26afb784f817a08b78bebcd13649b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page