Official

meta / llama-2-13b-chat

A 13 billion parameter language model from Meta, fine tuned for chat completions

  • Public
  • 4.8M runs
  • Priced per token
  • GitHub
  • Paper
  • License
  • Prediction

    replicate-internal/llama-2-13b-chat-int8-1xa100-80gb-triton:e7c2a3a1
    ID
    ttgy7odbjixknazwei6shc5k6u
    Status
    Succeeded
    Source
    Web
    Hardware
    A100 (80GB)
    Total duration
    Created
    by @a16z-infra

    Input

    top_p
    1
    prompt
    User: Write a poem about open source machine learning. Assistant:
    max_length
    500
    temperature
    0.75
    repetition_penalty
    1

    Output

    Sure! Here's a poem about open source machine learning: In the realm of code, where algorithms reign A revolution's brewing, a new domain Open source machine learning, a force so grand Unlocking secrets, with a helping hand TensorFlow and PyTorch, they lead the pack GPUs and CPUs, they make it snap With scikit-learn and Keras too The possibilities are endless, as they do From deep learning to natural language The open source community, they paved the way For a future bright, with AI in sight A world of wonder, where machine learning takes flight So here's to the code, and those who write The open source machine learning, a true delight For it's the power of many, that makes us strong In this revolution, we all belong.
    Generated in
  • Prediction

    replicate-internal/llama-2-13b-chat-int8-1xa100-80gb-triton:e7c2a3a1
    ID
    ks7etr3bixmqtqse5gdb6vxtrm
    Status
    Succeeded
    Source
    Web
    Hardware
    A100 (80GB)
    Total duration
    Created

    Input

    top_p
    1
    prompt
    User: Explain the self-attention mechanism that Transformers use like I'm five. Assistant:
    max_length
    500
    temperature
    0.75
    repetition_penalty
    1

    Output

    Sure, I'd be happy to explain the self-attention mechanism in a way that's easy to understand! So, you know how sometimes you might be talking to someone, and you want to make sure they understand what you're saying? Maybe you repeat a word or phrase to make sure they get it, or you look them in the eye to make sure they're paying attention. That's kind of like what the self-attention mechanism does in Transformers. In a Transformer, the self-attention mechanism helps the model figure out which parts of the input it should focus on more when it's processing a sentence or paragraph. It does this by looking at all the different words in the input, and deciding which ones are the most important for understanding what the sentence means. For example, imagine you're trying to understand the sentence "The cat chased the mouse." The self-attention mechanism would help the model figure out which words are the most important for understanding this sentence. It might decide that "cat" and "mouse" are the most important words, because they're the nouns that the sentence is about. It might also decide that "chased" is important, because it's the verb that tells us what the cat did. So, the self-attention mechanism helps the model focus on the most important parts of the input, and ignore the less important parts. This helps the model understand the sentence better, and make more accurate predictions about what comes next. Does that make sense?
    Generated in
  • Prediction

    replicate-internal/llama-2-13b-chat-int8-1xa100-80gb-triton:e7c2a3a1
    ID
    fqch35bbyrcrj7zhl7zxb5k6ha
    Status
    Succeeded
    Source
    Web
    Hardware
    A100 (40GB)
    Total duration
    Created
    by @a16z-infra

    Input

    top_p
    0.2
    prompt
    User: Respond to this question only based on the information provided here. Cats like dogs, and dogs like rabbits. Cats like anything that dogs like. I really really dislike rabbits. How do cats feel about rabbits? Assistant:
    max_length
    500
    temperature
    0.75
    repetition_penalty
    1

    Output

    Based on the information provided, cats like dogs, and dogs like rabbits. Since cats like anything that dogs like, it can be inferred that cats also like rabbits. However, you mentioned that you really dislike rabbits, so it's possible that cats may not share the same sentiment.
    Generated in
  • Prediction

    replicate-internal/llama-2-13b-chat-int8-1xa100-80gb-triton:e7c2a3a1
    ID
    gzcomldbikyay2s6q6744lsyt4
    Status
    Succeeded
    Source
    Web
    Hardware
    A100 (80GB)
    Total duration
    Created
    by @a16z-infra

    Input

    top_p
    1
    prompt
    User: Write a python script that trains `bert-large` on the `IMDB` dataset using the Transformers `Trainer` class and Datasets library. I have access to four GPUs, so let's use DDP. Please write the script and then tell me how to launch it on the command line. Assistant:
    max_length
    2000
    temperature
    0.25
    repetition_penalty
    1

    Output

    Sure! Here is the script you requested: ``` import torch from transformers import BertTokenizer, BertModel from transformers.training import Trainer from torch.utils.data import DataLoader from datasets import load_dataset # Load the IMDB dataset train_dataset = load_dataset("imdb", split="train") val_dataset = load_dataset("imdb", split="val") # Load the BERT model tokenizer = BertTokenizer.from_pretrained("bert-base-uncased") model = BertModel.from_pretrained("bert-base-uncased") # Define the training and validation dataloaders train_dataloader = DataLoader(train_dataset, batch_size=32, shuffle=True) val_dataloader = DataLoader(val_dataset, batch_size=32, shuffle=False) # Define the training arguments training_args = TrainingArguments( output_dir="./results", num_train_epochs=3, per_device_train_batch_size=32, per_device_eval_batch_size=32, evaluation_strategy="epoch", learning_rate=5e-5, save_total_limit=2, save_steps=500, load_best_model_at_end=True, metric_for_best_model="f1", greater_is_better=True, save_strategy="steps", save_on_each_node=True, ) # Train the model trainer = Trainer( model=model, args=training_args, train_dataset=train_dataset, eval_dataset=val_dataset, compute_metrics=lambda pred: {"f1": f1_score(y_true=pred.label_ids, y_pred=pred.predictions.argmax, average="macro")}, ) trainer.train() # Print the final trained model print(trainer.model) ``` To launch the script on the command line, you can use the following command: ``` python -m torch.distributed.launch training_bert_imdb.py --n_gpus 4 ``` This will launch the script on four GPUs. You can adjust the number of GPUs as needed. I hope this helps! Let me know if you have any questions.
    Generated in
  • Prediction

    replicate-internal/llama-2-13b-chat-int8-1xa100-80gb-triton:e7c2a3a1
    ID
    7zz3ldtbbef6bh6rbfdl35wovu
    Status
    Succeeded
    Source
    Web
    Hardware
    A100 (80GB)
    Total duration
    Created
    by @a16z-infra

    Input

    top_p
    1
    prompt
    User: give me a recipe for an old fashioned cocktail Assistant:
    max_length
    500
    temperature
    0.75
    repetition_penalty
    1

    Output

    Sure thing! An old fashioned is a classic cocktail that's made with bourbon or rye whiskey, sugar, bitters, and a twist of citrus peel. Here's a simple recipe you can follow: Ingredients: * 2 oz bourbon or rye whiskey * 1/2 oz simple syrup (equal parts water and granulated sugar, dissolved) * 2 dashes Angostura bitters * Orange peel (optional, for garnish) Instructions: 1. In a mixing glass, combine the bourbon or rye, simple syrup, and bitters. 2. Fill the mixing glass with ice and stir for about 30 seconds to chill and dilute the ingredients. 3. Strain the mixture into a rocks glass filled with ice. 4. Garnish with an orange peel, if desired (just twist the peel over the drink to release the oils and add a touch of citrus flavor). Enjoy your old fashioned! Let me know if you have any questions or if you'd like any variations on the recipe.
    Generated in
  • Prediction

    replicate-internal/llama-2-13b-chat-int8-1xa100-80gb-triton:e7c2a3a1
    ID
    whgzw5jbkb7gkd6k6k52cvemhi
    Status
    Succeeded
    Source
    Web
    Hardware
    A100 (40GB)
    Total duration
    Created
    by @a16z-infra

    Input

    top_p
    0.41
    prompt
    User: please provide 10 fun names for a pet pelican. Please come up with unique emojis to go along with each name. Try not to repeat the same emojis. Make them fun, colorful, and loving names Assistant:
    max_length
    1000
    temperature
    2.87
    repetition_penalty
    1

    Output

    Here are 10 fun and unique name suggestions for your pet pelican, along with corresponding emojis to match each name: 🐦 Luna 🌙 - a mystical name that conjures up images of celestial wonder. 🐧 Captain Pelli 🏴‍☠️ - a fun and playful name that captures the bird's pirate spirit. 🦠 Prof. Pelly P. 🐝 - a learned and wise name that reflects the pelican's intelligent nature. 🐠 Flappy McFlapster 🤣 - a lighthearted and silly name that suits a playful and lively pelican. 🐕 Pelty the Peli-Puppy 🐾 - a sweet and cuddly name that pairs well with the bird's friendly demeanor. 🎨 Pelli Pixel 🖼️ - a whimsical name that celebrates the bird's unique coloring and patterning. 🏠 Sir Pells A-Lot 🐠 - a regal and formal name that befits a stately and majestic pelican. 🐚 Lily Pellicano 🐌 - a charming and feminine name that complements the bird's delicate features. 🎭 Peli Popcorn 🍿 - a playful and theatrical name that matches the bird's showy antics.
    Generated in
  • Prediction

    replicate-internal/llama-2-13b-chat-int8-1xa100-80gb-triton:e7c2a3a1
    ID
    4p5yfkbbzfqo2gp642chqdxxdi
    Status
    Succeeded
    Source
    Web
    Hardware
    A100 (40GB)
    Total duration
    Created
    by @a16z-infra

    Input

    top_p
    1
    prompt
    User: My database has the following tables: - customers, orders, and products The customer table has the following columns: - cust_id, name, email, home_address_state, phone The orders table has the following columns: - order_id, cust_id, prod_id, units_purchased, discount_percent The products table has the following columns: - prod_id, product name, product_description, unit_price Write me a sql query based on the above that will show me my total revenue by state of customer. Assistant:
    max_length
    500
    temperature
    0.75
    repetition_penalty
    1

    Output

    Sure! Here is a sample SQL query that should give you the total revenue by state of customer based on the tables you provided: SELECT state, SUM(orders.units_purchased * products.unit_price) AS revenue FROM customers JOIN orders ON customers.cust_id = orders.cust_id JOIN products ON orders.prod_id = products.prod_id GROUP BY state This query joins the customers, orders, and products tables on the common column of cust_id, and then groups the results by state to give you the total revenue by state.
    Generated in
  • Prediction

    replicate-internal/llama-2-13b-chat-int8-1xa100-80gb-triton:e7c2a3a1
    ID
    y2ym6szb57znjkirlbyxc4dlcm
    Status
    Succeeded
    Source
    Web
    Hardware
    A100 (40GB)
    Total duration
    Created
    by @a16z-infra

    Input

    top_p
    1
    prompt
    Write a story in the style of James Joyce. The story should be about a trip to the Irish countryside in 2083, to see the beautiful scenery and robots.
    temperature
    0.75
    system_prompt
    You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
    max_new_tokens
    500
    repetition_penalty
    1

    Output

    Sure, I'd be happy to help! Here's a story in the style of James Joyce, set in the Irish countryside in 2083: As I stepped off the pod-train and onto the lush green grass of the countryside, the crisp air filled my lungs and invigorated my senses. The year was 2083, and yet the rolling hills and sparkling lakes of Ireland seemed unchanged by the passage of time. The only difference was the presence of robots, their sleek metallic bodies and glowing blue eyes a testament to the advancements of technology. I had come to this place seeking solace and inspiration, to lose myself in the beauty of nature and the wonder of machines. As I wandered through the hills, I came across a group of robots tending to a field of crops, their delicate movements and precise calculations ensuring a bountiful harvest. One of the robots, a sleek and agile model with wings like a dragonfly, fluttered over to me and offered a friendly greeting. "Good day, traveler," it said in a melodic voice. "What brings you to our humble abode?" I explained my desire to experience the beauty of the Irish countryside, and the robot nodded sympathetically. "Ah, yes," it said. "There is much to see and explore here. Would you like a guided tour?" I eagerly accepted the offer, and the robot led me on a journey through the rolling hills and sparkling lakes. We saw towering waterfalls and ancient ruins, and the robot shared stories of the history and culture of the land. As we walked, the sun began to set, casting a golden glow over the landscape. As the stars began to twinkle in the night sky, the robot and I sat down on a hill overlooking the countryside. "This is a special place," the robot said, its voice filled with a sense of wonder. "A place where nature and technology coexist in harmony." I nodded in agreement, feeling a sense of awe and gratitude for this wondrous place. And as I looked out at the stars, I knew that this trip to the
    Generated in
  • Prediction

    replicate-internal/llama-2-13b-chat-int8-1xa100-80gb-triton:e7c2a3a1
    ID
    3q5z6dbbp7kcfh2dhdzglwmkqu
    Status
    Succeeded
    Source
    Web
    Hardware
    A100 (40GB)
    Total duration
    Created

    Input

    top_p
    1
    prompt
    My database has the following tables: - customers, orders, and products The customer table has the following columns: - cust_id, name, email, home_address_state, phone The orders table has the following columns: - order_id, cust_id, prod_id, units_purchased, discount_percent The products table has the following columns: - prod_id, product name, product_description, unit_price Write me a sql query based on the above that will show me my total revenue by state of customer.
    temperature
    0.75
    system_prompt
    You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
    max_new_tokens
    500
    repetition_penalty
    1

    Output

    Sure, I'd be happy to help! Based on the information you provided, here is a SQL query that will show you the total revenue by state of customer: ``` SELECT state, SUM(units_purchased * unit_price) AS revenue FROM customers JOIN orders ON customers.cust_id = orders.cust_id JOIN products ON orders.prod_id = products.prod_id GROUP BY state ``` Let me explain the query: 1. `SELECT state, SUM(units_purchased * unit_price) AS revenue`: We select two columns: `state` and `revenue`. The `state` column is the state of the customer, and the `revenue` column is the total revenue for that state. 2. `FROM customers`: We start by joining the `customers` table. 3. `JOIN orders ON customers.cust_id = orders.cust_id`: We join the `orders` table on the `cust_id` column. 4. `JOIN products ON orders.prod_id = products.prod_id`: We join the `products` table on the `prod_id` column. 5. `GROUP BY state`: We group the results by the `state` column. The query will return a table with two columns: `state` and `revenue`. The `revenue` column will have the total revenue for each state. Note that this query assumes that the state is stored in the `home_address_state` column of the `customers` table. If the state is stored in a different column, you'll need to adjust the query accordingly. I hope this helps! Let me know if you have any questions or need further assistance.
    Generated in
  • Prediction

    replicate-internal/llama-2-13b-chat-int8-1xa100-80gb-triton:e7c2a3a1
    ID
    qv66ayjbkyj5ynuft6odokrlta
    Status
    Succeeded
    Source
    Web
    Hardware
    A100 (40GB)
    Total duration
    Created

    Input

    top_p
    1
    prompt
    please provide 10 fun names for a pet pelican. Please come up with unique emojis to go along with each name. Try not to repeat the same emojis. Make them fun, colorful, and loving names
    temperature
    0.75
    system_prompt
    You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
    max_new_tokens
    500
    repetition_penalty
    1

    Output

    Of course! I'd be happy to help you come up with some fun and unique names for your pet pelican. Here are ten suggestions, each accompanied by a fun and colorful emoji: 1. Peanut 🥜 - A playful and affectionate name for a small and adorable pelican. 2. Puddles 🐦 - A cute and quirky name for a pelican that loves to splash and play in the water. 3. Pelty 🐧 - A fun and bubbly name for a pelican with a lively personality. 4. Sunny ☀️ - A bright and cheerful name for a pelican with a sunny disposition. 5. Splishy 🐳 - A playful and whimsical name for a pelican that loves to splash and play in the water. 6. Luna 🌙 - A celestial and dreamy name for a pelican with a calm and peaceful demeanor. 7. Nibbles 🐣 - A cute and endearing name for a pelican that loves to nibble on tasty treats. 8. Scout 🐦 - A fun and adventurous name for a pelican that loves to explore and discover new things. 9. Fina 🐟 - A playful and lively name for a pelican with a bubbly and energetic personality. 10. Tango 🕺 - A fun and sassy name for a pelican with a lively and passionate spirit. I hope these suggestions help inspire you to find the perfect name for your pet pelican!
    Generated in

Want to make some of these yourself?

Run this model