By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
10alert.com10alert.com10alert.com
  • Threats
    • WordPress ThreatsDanger
    Threats
    A cyber or cybersecurity threat is a malicious act that seeks to damage data, steal data, or disrupt digital life in general. Cyber threats include…
    Show More
    Top News
    How to Fight Rootkits -Kaspersky Daily
    1 year ago
    Faketoken Banking Trojan is Getting Widespread in 55 Countries
    1 year ago
    95% of Android phones can be hacked with one just MMS
    1 year ago
    Latest News
    Patchstack Becomes Member Of Open Source Security Foundation
    14 hours ago
    PDF Phishing: Beyond the Bait
    17 hours ago
    Update ASAP! Critical Unauthenticated Arbitrary File Upload in MW WP Form Allows Malicious Code Execution
    20 hours ago
    Fake CVE Phishing Campaign Tricks WordPress Users Into Installing Malware
    2 days ago
  • Fix
    Fix
    Troubleshooting guide you need when errors, bugs or technical glitches might ruin your digital experience.
    Show More
    Top News
    Unscheduled update for WordPress fixes two critical vulnerabilities
    Unscheduled update for WordPress fixes two critical vulnerabilities
    1 year ago
    Windows 11 build 22621.457 (KB5016695) outs in Release Preview Channel
    1 year ago
    How to change time zone on Windows 11
    1 year ago
    Latest News
    How automatically delete unused files from my Downloads folder?
    10 months ago
    Now you can speed up any video in your browser
    10 months ago
    How to restore access to a file after EFS or view it on another computer?
    10 months ago
    18 Proven Tips to Speed Up Your WordPress Site and Improve SEO | 2023 Guide
    11 months ago
  • How To
    How ToShow More
    A year in recap: Windows accessibility
    20 hours ago
    How to stop, disable, and remove any Android apps — even system ones
    3 days ago
    Bigger, Better, Cooler in a 2U1N form factor
    Bigger, Better, Cooler in a 2U1N form factor
    4 days ago
    Vulnerability in crypto wallets created online in the early 2010s
    5 days ago
    Use Windows 11 features to inspire creativity, speed up everyday tasks
    6 days ago
  • News
    News
    This category of resources includes the latest technology news and updates, covering a wide range of topics and innovations in the tech industry. From new…
    Show More
    Top News
    How to set HDR (JXR) wallpapers on Windows 11
    4 months ago
    How to extract Zip, RAR, 7z, Tar on Windows 11
    3 months ago
    How to turn Wi-Fi On or Off on Windows 11
    2 months ago
    Latest News
    How to check CPU temp on Windows 11
    17 mins ago
    How to disable news feed from Widgets on Windows 11
    18 hours ago
    How to fix performance issues after upgrading to Windows 11 23H2
    18 hours ago
    How to disable updates on Windows 10 Pro and Home
    2 days ago
  • Glossary
  • My Bookmarks
Reading: Writing poems using LLama 2 on Workers AI
Share
Notification Show More
Aa
Aa
10alert.com10alert.com
  • Threats
  • Fix
  • How To
  • News
  • Glossary
  • My Bookmarks
  • Threats
    • WordPress ThreatsDanger
  • Fix
  • How To
  • News
  • Glossary
  • My Bookmarks
Follow US
Apps

Writing poems using LLama 2 on Workers AI

Andra Smith
Last updated: 28 September
Andra Smith 2 months ago
Share
6 Min Read

Writing poems using LLama 2 on Workers AI

Matthew and Michelle, co-founders of Cloudflare, published their annual founders’ letter today. The letter ends with a poem written by an AI running using Workers AI on Cloudflare’s global network.

Here’s the code that wrote the poem. It uses Workers AI and the Meta Llama 2 model with 7B parameters and 8-bit integers. Just 14 lines of code running on the Cloudflare global network, and you’ve got your very own AI to chat with.

import { Ai } from "@cloudflare/ai";  export default {     async fetch(request: Request, env: Env): Promise {         const body=await request.json();         const ai=new Ai(env.AI);         const response=await ai.run("@cf/meta/llama-2-7b-chat-int8", body);         return new Response(JSON.stringify(response));     }, };  export interface Env {     AI: any; } 

That was deployed on Workers AI and all I had to do was ask for poems. Here’s my terminal output (with just the domain name changed).

% curl -X POST https://example.com/ -d '{"prompt":"Write a poem  that talks about the connectivity cloud"}' | jq -r .response 

Cloud computing provides a connectivity that's unmatched,
A bridge that spans the globe with ease and grace.
It brings us closer, no matter where we are,
And makes the world a smaller, more intimate place.

With just a click, we can connect and share,
Our thoughts and ideas, our hopes and dreams.
The cloud unites us, in a way that's fair,
And makes the world a more harmonious theme.

So let us embrace this connectivity,
And use it to build a better world for all.
For in the cloud, we find a unity,
That can help us reach new heights, and stand tall.

% curl -X POST https://example.com/ -d '{"prompt":"Write a poem  that talks about the connectivity cloud and contrast it with the   captivity cloud"}' | jq -r .response 

The connectivity cloud, a wondrous sight to see,
Where data flows and knowledge is set free,
A place where minds meet and ideas take flight,
A world of endless possibility in sight.

But then there's the captivity cloud, a darker place,
Where thoughts are trapped and minds are in disgrace,
A prison of the mind, where freedom's lost,
A world of endless sorrow and cost.

So let us choose the connectivity cloud,
And let our minds be free and allowed,
To soar and glide and reach for the sky,
And never be held back, but always fly.

% curl -X POST https://example.com/ -d '{"prompt":"Write a poem  that talks about the connectivity cloud and contrast it with the   captivity cloud using Elizabethan English"}' | jq -r .response 

In the connectivity cloud, I find my peace,
Where thoughts and dreams and hopes do cease to flee.
The captivity cloud doth but darken my day,
With chains of sorrow that will not away.

In the connectivity cloud, I find my home,
Where love and joy and laughter do make their moan.
The captivity cloud doth but lock me in,
With sorrow's shackles that will not give in.

In the connectivity cloud, I find my fate,
Where fortune smiles and misery doth wait.
The captivity cloud doth but bring me woe,
With darkness that will not let me go.

In the connectivity cloud, I find my heart,
Where love and hope and joy do play their part.
The captivity cloud doth but tear it apart,
With sorrow's hand that will not let it start.

% curl -X POST https://example.com/ -d '{"prompt":"Write a poem  that talks about the connectivity cloud and contrast it with the   captivity cloud in the style of Lord Byron"}' | jq -r .response 

In the realm of the cloud, where data reigns supreme,
A new divide has emerged, a digital dream,
The connectivity cloud, a place of delight,
Where knowledge and wisdom take flight.

But then there's the captivity cloud, a darker hue,
Where privacy and security are hard to pursue,
A prison of sorts, where freedom's light is lost,
And data's secrets are forever crossed.

Yet still, we cling to the captivity cloud,
For in its depths, we find a measure of proof,
That though the connectivity cloud may be bright,
The captivity cloud holds a certain allure in sight.

So let us embrace both, the light and the dark,
For in their union, we find a digital spark,
That illuminates the path to a brighter day,
Where knowledge and privacy reign in a digital way.

What are you going to build on Workers AI? It’s ready and waiting. We’ll help you go from idea to deployed in minutes.

If you want to know exactly how to deploy something like this read the Workers AI announcement blog.


Source: cloudflare.com

Translate this article

TAGGED: Cloudflare, Security, Social engineering, Software
Andra Smith September 28, 2023 September 27, 2023
Share This Article
Facebook Twitter Reddit Telegram Email Copy Link Print

STAY CONECTED

24.8k Followers Like
253.9k Followers Follow
33.7k Subscribers Subscribe
124.8k Members Follow

LAST 10 ALERT

How to check CPU temp on Windows 11
News 3 hours ago
Patchstack Becomes Member Of Open Source Security Foundation
Patchstack Becomes Member Of Open Source Security Foundation
Wordpress Threats 17 hours ago
PDF Phishing: Beyond the Bait
Threats 20 hours ago
A year in recap: Windows accessibility
Windows 20 hours ago
How to disable news feed from Widgets on Windows 11
News 21 hours ago

You Might Also Like

Patchstack Becomes Member Of Open Source Security Foundation
Wordpress Threats

Patchstack Becomes Member Of Open Source Security Foundation

17 hours ago
Threats

PDF Phishing: Beyond the Bait

20 hours ago
News

How to fix performance issues after upgrading to Windows 11 23H2

21 hours ago
Fake CVE Phishing Campaign Tricks WordPress Users Into Installing Malware
Wordpress Threats

Fake CVE Phishing Campaign Tricks WordPress Users Into Installing Malware

2 days ago
Show More

Related stories

Several Critical Vulnerabilities including Privilege Escalation, Authentication Bypass, and More Patched in UserPro WordPress Plugin
BridesMaid – neuron writes toasts For those very occasions when you need to give out a powerful
The other day Yandex pleased us with the announcement of a new Midi station – an excellent reason to listen
REMIX – remixes of pictures from neural networksCreate, share and correct works
How to download Diablo IV for free and absolutely legallyBlizzard has opened a free
Rostelecom employees were forced to abandon Android and iOS in favor of Aurora.
Previous Next

10 New Stories

How to fix performance issues after upgrading to Windows 11 23H2
Update ASAP! Critical Unauthenticated Arbitrary File Upload in MW WP Form Allows Malicious Code Execution
Fake CVE Phishing Campaign Tricks WordPress Users Into Installing Malware
How to disable updates on Windows 10 Pro and Home
How to stop, disable, and remove any Android apps — even system ones
Patchstack Alliance Bounty Program Events for December
Previous Next
Hot News
How to check CPU temp on Windows 11
Patchstack Becomes Member Of Open Source Security Foundation
PDF Phishing: Beyond the Bait
A year in recap: Windows accessibility
How to disable news feed from Widgets on Windows 11
10alert.com10alert.com
Follow US
© 10 Alert Network. All Rights Reserved.
  • Privacy Policy
  • Contact
  • Customize Interests
  • My Bookmarks
  • Glossary
Go to mobile version
adbanner
AdBlock Detected
Our site is an advertising supported site. Please whitelist to support our site.
Okay, I'll Whitelist
Welcome Back!

Sign in to your account

Lost your password?