u/Few-Mycologist7747

Did you see this project "ext-infer"?

Did you see this project "ext-infer"?

Just came across ext-infer, a pretty interesting project for PHP developers building AI-powered applications.

It’s a PHP 8.3+ extension that runs local LLM inference directly inside PHP using llama.cpp—no Python service, no API calls, no sidecar processes. It supports chat completions, embeddings, and reasoning models through a native PHP API.

Some highlights:

  • Run GGUF models locally
  • Built-in embeddings support
  • Cosine similarity helpers
  • Reasoning output extraction (<think>...</think>)
  • Thread-safe and works with PHP workers
  • Optional Apple Metal acceleration

As someone who usually sees AI integrations in PHP implemented via external APIs or Python microservices, it's refreshing to see a native approach.

GitHub: https://github.com/DisplaceTech/ext-infer

u/Few-Mycologist7747 — 2 days ago

If embeddings are the language of modern AI, then similarity metrics are the grammar in ML.

Important ML concepts become much easier once you stop thinking about algorithms and start thinking about geometry.

Every embedding, feature vector, recommendation, semantic search result, or clustering algorithm ultimately relies on one simple question:

How do we measure similarity?

In my latest article, I break down three fundamental concepts that appear everywhere in machine learning:

➡️ Euclidean Distance — when absolute proximity matters
➡️ Dot Product — when both direction and magnitude matter
➡️ Cosine Similarity — when orientation matters more than size

Understanding the difference between these metrics explains why:
• Vector databases use cosine similarity for semantic search
• Recommendation systems rely heavily on vector similarity
• Embeddings work at all
• Different ML models can produce very different results on the same data

If you've ever used embeddings without fully understanding what happens behind the scenes, this article is for you.
https://medium.com/@leumas.a/distances-and-similarity-in-ml-0a4796242215

reddit.com
u/Few-Mycologist7747 — 2 days ago

The AI Agent Ecosystem in PHP is Growing Faster Than I Expected

I've been exploring AI agent frameworks lately and noticed that most discussions focus on Python, LangChain, AutoGen, CrewAI, etc.

This article takes a different angle and maps out what's happening in the PHP ecosystem, from simple OpenAI integrations all the way to multi-agent orchestration platforms:

https://medium.com/@leumas.a/the-ai-agent-ecosystem-in-php-from-simple-openai-calls-to-multi-agent-platforms-320a74e78d95

A few things I found interesting:

  • The PHP ecosystem now has dedicated AI tooling beyond basic API wrappers.
  • There are frameworks for agent workflows, tool calling, memory, RAG, and orchestration.
  • Several projects are trying to bring concepts popularized in Python into Laravel and modern PHP applications.
  • The ecosystem seems to be moving from "AI features" toward actual agent-based architectures.

For developers working in PHP, it raises an interesting question:

Do you see PHP becoming a serious platform for AI agents, or will Python continue to dominate anything beyond simple integrations?

reddit.com
u/Few-Mycologist7747 — 8 days ago

Learning Armenian is hard. Learning to type Armenian was even harder.

I've been learning Armenian for a while, and one thing I didn't expect was how difficult it would be to type comfortably in the Armenian alphabet.

Reading is one thing, but writing messages, comments, or emails in Armenian is much slower when you're constantly searching for letters on the keyboard.

I recently found an Armenian typing trainer that helped me get used to the layout much faster.

Has anyone else here used typing tutors for Armenian? Or did you just learn through daily use?

reddit.com
u/Few-Mycologist7747 — 11 days ago

One of the most important ideas behind machine learning – vectors, dimensions, and feature spaces.

Most ML tutorials jump straight into algorithms, but understanding how data is represented geometrically changes everything:

  • why embeddings work
  • how similarity is measured
  • what "high-dimensional space" actually means
  • why ML models operate on vectors, not raw objects

Explains these concepts visually and from a developer’s perspective (especially for PHP devs getting into AI/ML).

https://apphp.gitbook.io/ai-for-php-developers/english/1.2-vectors-dimensions-and-feature-spaces

u/Few-Mycologist7747 — 1 month ago

Want to get a real feel for machine learning in practice?

Here’s a simple but powerful exercise: classify thousands of digits (0 vs 1) from the MNIST dataset (12,666 train samples and 2,116 test samples) using logistic regression — trained with gradient descent. Just 5 epochs.

What you’ll get out of it:

  • see how a model actually works with image data
  • understand where linear models start to break down
  • try a clean implementation in pure PHP
    • accuracy: 99.91%
  • compare it with a more production-ready approach using RubixML
    • accuracy: 99.95%

If you’ve been meaning to move from theory to something hands-on, this is a great place to start:
https://aiwithphp.org/books/ai-for-php-developers/examples/part-3/logistic-regression/case-0/mnist-0-1

reddit.com
u/Few-Mycologist7747 — 2 months ago

If someone tells you "PHP isn't meant for Machine Learning or AI"… just send them this https://github.com/apphp/awesome-php-ml

A curated list of 134+ resources for building ML, AI, LLM, NLP, vector search, and RAG systems in PHP.

Includes:
• Machine Learning libraries
• LLM clients & AI frameworks
• Vector databases & embeddings
• NLP and computer vision tools
• Laravel & Symfony AI integrations
• Data science and math libraries

PHP can absolutely power intelligent systems – and the ecosystem keeps growing.

u/Few-Mycologist7747 — 3 months ago