Downloads · 30 days
137
4% of all-time downloads
SmartGitiCorp/best_Persian_LLM_AYA23_GGUF
best_Persian_LLM_AYA23_GGUF is a machine learning model from SmartGitiCorp. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
this is the Best Persian LLM can you use locally. I tested it on Intel(R) Corei5-12400F 2.50 GHz and it did well. Also, you should have +16Gig RAM and +8Gig VRAM on the GPU.
Downloads · 30 days
137
4% of all-time downloads
All-time downloads
3.1K
Public
Repo size
4.8 GB
Likes
7
Public
Click a slice to open those files.
.gguf4.8 GB · 100%
From the Hugging Face model README
this is the Best Persian LLM can you use locally. I tested it on Intel(R) Corei5-12400F 2.50 GHz and it did well.
Also, you should have +16Gig RAM and +8Gig VRAM on the GPU.
from langchain.callbacks.manager import CallbackManager
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
from langchain.chains import LLMChain
from langchain.llms import LlamaCpp
from langchain.prompts import PromptTemplate
n_gpu_layers = 14 # Change this value based on your model and your GPU VRAM pool.
n_batch = 50 # Should be between 1 and n_ctx, consider the amount of VRAM in your GPU.
# Callbacks support token-wise streaming
callback_manager = CallbackManager([StreamingStdOutCallbackHandler()])
# Make sure the model path is correct for your system!
llm = LlamaCpp(
model_path="aya-23-8B-GGUF/aya-23-8B-Q4_K_S.gguf",
n_gpu_layers=n_gpu_layers,
n_batch=n_batch,
max_new_tokens=512,
callback_manager=callback_manager,
verbose=True, # Verbose is required to pass to the callback manager
)
# Prompt Template
template = """
متن زیر را خلاصه کن:
{prompt}
"""
prompt = input("Please enter the prompt: ")
prompt_template = PromptTemplate(input_variables=["prompt"], template=template)
# Create the LLM Chain
llm_chain = LLMChain(llm=llm, prompt=prompt_template)
# Run the chain with a specific prompt
res = llm_chain.run(prompt=prompt)
print(res)
Change the text on the template and be sure that defines your task in this part. Then you can give the text in the prompt variable or get it from input.
I prepared a sample for you that shows the power of this model.