Downloads · 30 days
10
7% of all-time downloads
alibidaran/LLAMA3-Reasoning_Python
LLAMA3-Reasoning_Python is a text generation model from alibidaran. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
from unsloth import FastLanguageModel from transformers import ( pipeline, logging, )
Downloads · 30 days
10
7% of all-time downloads
All-time downloads
153
Public
Repo size
32.1 GB
Likes
0
Public
Click a slice to open those files.
.bin16.1 GB · 100%
From the Hugging Face model README
from unsloth import FastLanguageModel
from transformers import (
pipeline,
logging,
)
FastLanguageModel.for_inference(model) # Enable native 2x faster inference
logging.set_verbosity(logging.CRITICAL)
# Run text generation pipeline with our next model
prompt="""
You are expert python programmer. You need to write a function based on the given <description>
<description>
You are given a sequence of positive integers a1, a2, ..., an. Find all such indices i, that the i-th element equals the arithmetic mean of all other elements (that is all elements except for this one).\nInput\n\nThe first line contains the integer n (2 ≤ n ≤ 2·105). The second line contains elements of the sequence a1, a2, ..., an (1 ≤ ai ≤ 1000). All the elements are positive integers.\n\nOutput\n\nPrint on the first line the number of the sought indices. Print on the second line the sought indices in the increasing order. All indices are integers from 1 to n.\n\nIf the sought elements do not exist, then the first output line should contain number 0. In this case you may either not print the second line or print an empty line.\n\nExamples\n\nInput\n\n5\n1 2 3 4 5\n\n\nOutput\n\n1\n3 \n\nInput\n\n4\n50 50 50 50\n\n\nOutput\n\n4\n1 2 3 4</description>
<output>
"""
pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=3000,do_sample=True,top_k=10,top_p=0.9)
result = pipe(prompt)
print(result[0]['generated_text'])