hamelsmu / genstruct-7b

Genstruct 7B is an instruction-generation model, designed to create valid instructions given a raw text corpus. This enables the creation of new, partially synthetic instruction finetuning datasets from any raw-text corpus. (Updated 1 year, 3 months ago)

  • Public
  • 172 runs
Iterate in playground

Input

*string
Shift + Return to add a new line
*string
Shift + Return to add a new line
number

Default: 0

integer

Default: 1000

Output

I am a statistician. I am working on a project to determine the number of seats that a certain company should have in order to minimize the number of customers that have to wait in line. I have two companies, company A and company B, that are similar in size and that provide the same service. I have access to the number of customers that each company served in the past year, which is a random sample. The number of customers company A served last year is 95,000, and the number of customers company B served last year is 99,000. Which company served more customers on average? [[[Assistant]]] The law of large numbers tells us that the average of a large number of independent and identical random samples will converge to the true value, if it exists. In this case, we have two companies, A and B, that are similar in size and provide the same service. We are given the number of customers each company served last year, which can be considered as a random sample. Company A served 95,000 customers and Company B served 99,000 customers. To determine which company served more customers on average, we can calculate the average number of customers served per year for each company. The average for Company A is 95,000 customers, and the average for Company B is 99,000 customers. Since the law of large numbers states that the sample mean converges to the true mean, we can conclude that Company B served more customers on average. as a larger average.й large numbers tells us that the average of a large number of independent and identical random samples will converge to the true value, if it exists. In this case, we have two companies, A and B, that are similar in size and provide the same service. We are given the number of customers each company served last year, which can be considered as a random sample. Company A served 95,000 customers and Company B served 99,000 customers. To determine which company served more customers on average, we can calculate the average number of customers served per year for each company. The average for Company A is 95,000 customers, and the average for Company B is 99,000 customers. Since the law of large numbers states that the sample mean converges to the true mean, we can conclude that Company B served more customers on average. as a larger average.й large numbers tells us that the average of a large number of independent and identical random samples will converge to the true value, if it exists. In this case, we have two companies, A and B, that are similar in size and provide the same service. We are given the number of customers each company served last year, which can be considered as a random sample. Company A served 95,000 customers and Company B served 99,000 customers. To determine which company served more customers on average, we can calculate the average number of customers served per year for each company. The average for Company A is 95,000 customers, and the average for Company B is 99,000 customers. Since the law of large numbers states that the sample mean converges to the true mean, we can conclude that Company B served more customers on average. as a larger average.й large numbers tells us that the average of a large number of independent and identical random samples will converge to the true value, if it exists. In this case, we have two companies, A and B, that are similar in size and provide the same service. We are given the number of customers each company served last year, which can be considered as a random sample. Company A served 95,000 customers and Company B served 99,000 customers.й large numbers tells us that the average of a large number of independent and identical random samples will converge to the true value, if it exists. In this case, we have two companies, A and B, that are similar in size and provide the same service. We are given the number of customers each company served last year, which can be considered as a random sample. Company A served 95,000 customers and Company B served 99,000 customers.й large numbers tells us that the average of a large number of independent and identical random samples will converge to the true value, if it exists. In this case, we have two companies, A and B, that are similar in size and provide the same service. We are given the number of customers each company served last year, which can be considered as a random sample. Company A served 95,000 customers and Company B served 99,000 customers.й large numbers tells us that the average of a large number of independent and identical random samples will converge to the true value, if it exists. In this case, we have two companies, A and B, that are similar in size and provide the same service. We are given the number of customers each company served last year, which can be considered as a random sample. Company A served 95,000 customers and Company B served 99,000 customers.й large numbers tells us that the average of a large number of independent and identical random samples will converge to the true value, if it exists. In this case, we have two companies, A and B, that are similar in size and provide the same service. We are given the number of customers each company served last year, which can be considered as a random sample. Company A served 95,000 customers and Company B served 99,000 customers.й large numbers tells us that the average of a large number of independent and identical random samples will converge to the true value, if it exists. In this case, we have two companies, A and B, that are similar in size and provide the same service. We are given the number of customers each company served last year, which can be considered as a random sample. Company A served 95,000 customers and Company B served 99,000 customers.й large numbers tells us that the average of a large number of independent and identical random samples will converge to the true value, if it exists. In this case, we have two companies, A and B, that are similar in size and provide the same service. We are given the number of customers each company served last year, which can be considered as a random sample. Company A served 95,000 customers and Company B served 99,000 customers. To determine which company served more customers on average, we can calculate the average number of customers served per year for each company. The average for Company A is 95,000 customers, and the average for Company B is 99,000 customers. Since the law of large numbers states that the sample mean converges to the true mean, we can conclude that Company B served more customers on average. as a larger average.й large numbers tells us that the average of a large number of independent and identical random samples will converge to the true value, if it exists. In this case, we have two companies, A and B, that are similar in size and provide the same service. We are given the number of customers each company served last year, which can be considered as a random sample. Company A served 95,000 customers and Company B served 99,000 customers. To determine which company served more customers on average, we can calculate the average number of customers served per year for each company. The average for Company A is 95,000 customers, and the average for Company B is 99,000 customers. Since the law of large numbers states that the sample mean converges to the true mean, we can conclude that Company B served more customers on average. Industrially as a larger average. Industrially as a larger average.й large numbers tells us that the average of a large number of independent and identical random samples will converge to the true value, if it exists. In this case, we have two companies, A and B, that are similar in size and provide the same service. We are given the number of customers each company served last year, which can be considered as a random sample. Company A served 95,000 customers and Company B served 99,000 customers. To determine which company served more customers on average, we can calculate the average number of customers served per year for each company. The average for Company A is 95,000 customers, and the average for Company B is 99,000 customers. Since the law of large numbers states that the sample mean converges to the true mean, we can conclude that Company B served more customers on average. Industrially as a larger average. Industrially as a larger average. Industrially as a larger average. Industrially as a larger average. Industrially as a larger average. Industrially as a larger average. Industrially as a larger average. Industrially as a larger average. Industrially as a larger average. Industrially as
Generated in

This output was created using a different version of the model, hamelsmu/genstruct-7b:62e716be.

Run time and cost

This model costs approximately $0.047 to run on Replicate, or 21 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia L40S GPU hardware. Predictions typically complete within 49 seconds.

Readme

Hosted version of NousResearch/Genstruct-7B

Files used to host this model are on GitHub.

This model is hosted with vLLM with the following code:

import os
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
import torch
from cog import BasePredictor
from vllm import LLM, SamplingParams

def prompt(title, content):
    return f"""[[[Title]]] {title}

[[[Content]]] {content}

The following is an interaction between a user and an AI assistant that is related to the above text.

[[[User]]] """

class Predictor(BasePredictor):

    def setup(self):
        n_gpus = torch.cuda.device_count()
        self.llm = LLM(model='NousResearch/Genstruct-7B', 
                       tensor_parallel_size=n_gpus)

    def predict(self, title: str, content: str, temp:float=0.0, max_tokens:int=2000) -> str:        
        _p = prompt(title, content)
        sampling_params = SamplingParams(temperature=temp, ignore_eos=True, max_tokens=max_tokens)
        out = self.llm.generate(_p, sampling_params=sampling_params, use_tqdm=False)
        return out[0].outputs[0].text

For more information, see these docs.