Code
Tokenization
text = "LLM example"
tokens = text.split()
Python
Transformers
from transformers import pipeline
nlp = pipeline("text-generation")
nlp("Hello")
JS
API example
fetch('/api/llm', {
method:'POST',
body: JSON.stringify({prompt:"Hello"})
})
Demo
Try LLM
Filter