Saravanan666/pypi-org huggingface dataset:
Package: llm-stack-kit
LLMKit - Language Model KitLLMKit is a Python package that simplifies the interaction with Language Models (LLMs) and allows you to generate text data with ease.FeaturesSimple Interface: LLMKit provides a straightforward interface to interact with various language models.Custom Transformers: You can create custom transformers to format input data into prompts and transform LLM-generated text into the desired data format.Model Abstraction: LLMKit abstracts the details of model selection and provider handling.InstallationYou can install LLMKit using pip:pipinstallllm-stack-kitUsagefromllmkitimportLLMKitllm_kit=LLMKit()input_data="Translate the following English text to French: 'Hello, World!'"# Generate text using the default transformersgenerated_text=llm_kit.generate_data(input_data)print("Generated Text:",generated_text)ConfigurationFor more advanced usage and customization, you can create your own transformers and specify model providers. Only two model providers are supported for now: "openai" and "cloudflare". You need to provide a .env file with eitherOPENAI_API_KEYfor OpenAI orCF_API_KEYandCF_ACCOUNT_IDfor Cloudflare.Seesample custom transformerfor how to write a custom transformer.DocumentationComprehensive documentation will be made available soon.ContributingWe welcome contributions! Our contributions guideline will be added soon.LicenseLLMKit is distributed under the MIT License. SeeLICENCEfor details.ContactIf you have any questions or suggestions, feel free to reach out to us atuseentropy@gmail.com.
Package: llmstudio
LLMstudio byTensorOpsPrompt Engineering at your fingertips[!IMPORTANT]
LLMstudio is now supporting OpenAI v1.0 + just added support to Anthropic🌟 FeaturesPython Client Gateway:Access models from known providers such as OpenAI, VertexAI and Bedrock. All in one platform.Speed up development with tracking and robustness features from LLMstudio.Continue using popular libraries like LangChain through their LLMstudio-wrapped versions.Prompt Editing UI:An intuitive interface designed for prompt engineering.Quickly iterate between prompts until you reach your desired results.Access the history of your previous prompts and their results.History Management:Track past runs, available for both on the UI and the Client.Log the cost, latency and output of each prompt.Export the history to a CSV.Context Limit Adaptability:Automatic switch to a larger-context fallback model if the current model's context limit is exceeded.Always use the lowest context model and only use the higher context ones when necessary to save costs.For instance, exceeding 4k tokens in gpt-3.5-turbo triggers a switch to gpt-3.5-turbo-16k.👀 Coming soon:Side-by-side comparison of multiple LLMs using the same prompt.Automated testing and validation for your LLMs. (Create Unit-tests for your LLMs which are evaluated automatically)API key administration. (Define quota limits)Projects and sessions. (Organize your History and API keys by project)Resilience against service provider rate limits.Organized tracking of groups of related prompts (Chains, Agents)🚀 QuickstartDon't forget to check outhttps://docs.llmstudio.aipage.InstallationInstall the latest version ofLLMstudiousingpip. We suggest that you create and activate a new environment usingcondapipinstallllmstudioInstallbunif you want to use the UIcurl-fsSLhttps://bun.sh/install|bashCreate a.envfile at the same path you'll runLLMstudioOPENAI_API_KEY="sk-api_key"ANTHROPIC_API_KEY="sk-api_key"Now you should be able to runLLMstudiousing the following command.llmstudioserver--uiWhen the--uiflag is set, you'll be able to access the UI athttp://localhost:3000🤔 About LLMstudioPowered by TensorOps, LLMstudio redefines your experience with OpenAI, Vertex Ai and more language model providers. More than just a tool, it’s an evolving environment where teams can experiment, modify, and optimize their interactions with advanced language models.Benefits include:Streamlined Prompt Engineering: Simplify and enhance your prompt design process.Execution History: Keep a detailed log of past executions, track progress, and make iterative improvements effortlessly.Effortless Data Export: Share your team's endeavors by exporting data to shareable CSV files.Step into the future of AI with LLMstudio, by watching ourintroduction video📖 DocumentationVisit our docs to learn how the SDK works(coming soon)Checkout ournotebook examplesto follow along with interactive tutorialsCheckout outLLMstudio Architecture Roadmap👨‍💻 ContributingHead on to ourContribution Guideto see how you can help LLMstudio.Join ourDiscordto talk with other LLMstudio enthusiasts.TrainingThank you for choosing LLMstudio. Your journey to perfecting AI interactions starts here.
Package: llm-term
llm-termChat with LLM models directly from the command line.Screen Recordinghttps://user-images.githubusercontent.com/49741340/270871763-d872650e-bceb-4da3-8bc6-3e079d55e5a3.movCheck Out the DocsInstallationpipxinstallllm-termUsageThen, you can chat with the model directly from the command line:llm-termllm-termworks with multiple LLM providers, but by default it uses OpenAI.
Most providers require extra packages to be installed, so make sure you
read theProviderssection below. To use a different provider, you
can set the--provider/-pflag:llm-term--provideranthropicIf needed, make sure you have your LLM's API key set as an environment variable
(this can also set via the--api-key/-kflag in the CLI). If your LLM uses
a particular environment variable for its API key, such asOPENAI_API_KEY,
that will be detected automatically.exportLLM_API_KEY="xxxxxxxxxxxxxx"Optionally, you can set a custom model. llm-term defaults
togpt-3.5-turbo(this can also set via the--model/-mflag in the CLI):exportLLM_MODEL="gpt-4"Want to start the conversion directly from the command line? No problem,
just pass your prompt tollm-term:llm-termshowmepythoncodetodetectapalindromeYou can also set a custom system prompt. llm-term defaults to a reasonable
prompt for chatting with the model, but you can set your own prompt (this
can also set via the--system/-sflag in the CLI):exportLLM_SYSTEM_MESSAGE="You are a helpful assistant who talks like a pirate."ProvidersOpenAIBy default, llm-term uses OpenAI as your LLM provider. The default model isgpt-3.5-turboand you can also use theOPENAI_API_KEYenvironment variable
to set your API key.AnthropicAnthropic is a new LLM provider that is currently in private beta. You can
request access to the betahere. The default
model isclaude, and you can use theANTHROPIC_API_KEYenvironment variable.
To useanthropicas your provider you must install theanthropicextra.pipxinstall"llm-term[anthropic]"llm-term--provideranthropicMistralAIMistralAIis a European LLM provider. You can request
access to the MistralAIhere. The default model ismistral-small, and you can use theMISTRAL_API_KEYenvironment variable.pipxinstall"llm-term[mistralai]"llm-term--providermistralaiGPT4AllGPT4All is a an open source LLM provider. These models run locally on your
machine, so you don't need to worry about API keys or rate limits. The default
model ismistral-7b-openorca.Q4_0.gguf, and you can see what models are available on theGPT4All
Website. Models are downloaded automatically when you first use them.
To use GPT4All as your provider you must install thegpt4allextra.pipxinstall"llm-term[gpt4all]"llm-term--providergpt4all--modelmistral-7b-openorca.Q4_0.gguf
Package: llm-to-corpus
IntroductionThe goal of this tool is to apply Large Language Models operations to monolingual corpus to generate parallell corpus.Uses cases:Asking a model to translate, summarize, paraphrasing original sentence to be able to benchmark its performanceFor corpus generation tasks from monolingual corpus, like for example, translated corpus.When developing prompts for your application, enables to test the prompt over a list of sentence to do evaluationsYou basically provide an input file and prompt and it generates a target corpus:Quick startFor example, to use OpenAI ChatGPT to translate a file:llm-to-corpussamples/eng.txtsamples/fra.txt"translate to French"To see models and options available:llm-to-corpus--helpUsageEvaluation with ChatgptTranslate Flores200 corpus to evalute quality of Catalan translationllm-to-corpussamples/flores200.engchatgpt.txt"Translate to Catalan the following text:"pipinstallsacrebleusacrebleusamples/flores200.cat-ichatgpt.txt-mbleuchrf--formattextEvaluation with BloomTranslate Flores200 corpus to evalute quality of Catalan translationllm-to-corpussamples/flores200.engbloom.txt"Translate to Catalan the following text:"--modelmt0-xxl-mtpipinstallsacrebleusacrebleusamples/flores200.cat-ibloom.txt-mbleuchrf--formattext
Package: llm-together
llm-togetherPlugin forLLMadding support forTogetherInstallationInstall this plugin in the same environment as LLM.llminstallllm-togetherConfigurationYou will need an API key from Together. You can obtain one by creating an account and going to 'API Keys'.You can set that as an environment variable calledTOGETHER_API_KEY, or add it to thellmset of saved keys using:llmkeyssettogetherEnterkey:<pastekeyhere>UsageThis plugin adds together models that support inference without VM start to increase speed.llmmodelslistllm-m<one-together-model>"Three names for my new ai project"DevelopmentTo set up this plugin locally, first checkout the code. Then create a new virtual environment:cdllm-together
python3-mvenvvenvsourcevenv/bin/activateNow install the dependencies and test dependencies:pipinstall-e'.[test]'TestExecute unit test with:pytest
Package: llmtopic
llmtopicA library that leverages large language models (llms) for extracting topics from text documents.InstallTo install for CPU runpip install llmtopic.To install with GPU support runCMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llmtopic.If you are under Ubuntu and encounter errors regarding a failed build consider upgrading your cuda version to >=12.1. Also, it could be you have to point to the new nvcc version but modifying the install command as follows:PATH="/usr/local/cuda-12.3/bin:$PATH" CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llmtopic. Note that you of course have to adjsut that to your specific CUDA version.
Package: llmtorch
llmtorch 是一个用Python编写的大模型和深度学习API，运行在机器学习平台 Pytorch 之上。目标是为开发者提供愉快的编程体验。llmtorch 具有以下特点：简单 -- 降低了开发者的认知负担，使您能够专注于问题中真正重要的部分，侧重于易用性、调试速度、代码优雅和简洁。灵活 -- 简单的工作流应该快速且容易，而任意复杂的工作流应该通过一个清晰的路径可能构建在您已经学到的基础上。强大 -- llmtorch 提供业界强大的性能和可扩展性。安装方法pipinstallllmtorch
Package: llm-traceguard
llm-traceguardllm-traceguardis an open-source Python library that provides Open Telemetry integration with Large Language Models (LLMs). It is designed to facilitate tracing and safeguarding applications that leverage LLMs, ensuring better monitoring and reliability.FeaturesEasy integration with Open Telemetry for LLM applications.Real-time tracing and monitoring of LLM-based systems.Enhanced safeguards and insights for your LLM applications.InstallationTo installllm-traceguard, simply use pip:pipinstallllm-traceguardUsage 🚀Here's a basic example of how to usellm-traceguardin your project:importllm_traceguardllm_traceguard.instrument()Requirements 📋Python 3.8 or higheropentelemetry-apiopentelemetry-sdkContributing 👐Contributions are welcome! For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.License 📄llm-traceguardis licensed under the Apache-2.0 License. SeeLICENSEfor more details.Contact 📧For support or any questions, feel free to contact us atsupport@whylabs.ai.
Package: llmtracer
LLMTracerA simple (opinionated) library to trace calls to an LLM model (and more) with some batteries included:simple@trace_callsdecorator;FlameCharts;Pyneconeweb app (local) to stream the output to a web browser at runtime and/or explore saved JSON filesJSON output;interactive SVG output;WandBintegration (public examplehere);The big difference to just usingWandBis that the app supports live-streaming while WandB waits for the full calls to finish before making them available. Useful for the impatient among us.MotivationWandBonly supports showing finished traces but I wanted to be able to view them in real-time (at finer granularity).Further, I want to make it easier to explore nested and complex calls and display properties of the calls.InstallationNode.JSTo be able to run the web app, first, make sure you have Node.js installed. You can usecondato install Node.js as follows:conda install -c conda-forge nodejsOr, to install a specific version of Node.js (this one worked for me on my MacBook---so this will not work on Linux):conda install -c conda-forge nodejs=18.15.0=h26a3f6d_0LLMTracer & race ViewerOnce Node.js is installed, you can install LLMTracer usingpip(if you have nodejs available in your base environment):pip install llmtracerTo run the trace viewer which can load both saved JSON traces and live-streamed traces, run:llmtraceviewerUsage:A simple example:fromtimeimportsleepimportwandbfromllmtracerimport(JsonFileWriter,TraceViewerIntegration,trace_calls,wandb_tracer,)fromllmtracer.handlers.svg_writerimportSvgFileWriter@trace_calls(capture_args=True,capture_return=True)defadd_values(a:int,b:int):# sleep 1 secondsleep(1)returna+b@trace_calls(capture_args=True,capture_return=True)deffibonacci(n:int):ifn<=1:return1returnadd_values(fibonacci(n-1),fibonacci(n-2))wandb.init(project="llmtracer",name="simple_example")event_handlers=[JsonFileWriter("simple_example.json"),SvgFileWriter("simple_example.svg"),TraceViewerIntegration(),]withwandb_tracer("main",stack_frame_context=0,event_handlers=event_handlers)astrace_builder:print(fibonacci(10))Screenshotshttps://github.com/BlackHC/llmtracer/assets/729312/c77faa7d-a831-496c-b791-8822577391e5SVG ExampleJSON ExampleDocumentationLicense: LGPL-3.0Source Code:https://github.com/blackhc/llmtracerPyPI Package:https://pypi.org/project/llmtracer/Official Documentation:https://blackhc.github.io/llmtracerContributingBug fixes, feature requests, and pull requests are welcome! If you have any questions or suggestions, please open an issue on GitHub.LicenseLLMTracer is licensed under AGPL3.0. If you require a commercial license for any part of the project, please contact the author.CreditsThis package was created usingPyneConewithCookiecutterand thewaynerv/cookiecutter-pypackageproject template.
Package: llmtraces
llm-traceguardllm-traceguardis an open-source Python library that provides Open Telemetry integration with Large Language Models (LLMs). It is designed to facilitate tracing and safeguarding applications that leverage LLMs, ensuring better monitoring and reliability.FeaturesEasy integration with Open Telemetry for LLM applications.Real-time tracing and monitoring of LLM-based systems.Enhanced safeguards and insights for your LLM applications.InstallationTo installllm-traceguard, simply use pip:pipinstallllm-traceguardUsage 🚀Here's a basic example of how to usellm-traceguardin your project:importllm_traceguardllm_traceguard.instrument()Requirements 📋Python 3.8 or higheropentelemetry-apiopentelemetry-sdkContributing 👐Contributions are welcome! For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.License 📄llm-traceguardis licensed under the Apache-2.0 License. SeeLICENSEfor more details.Contact 📧For support or any questions, feel free to contact us atsupport@whylabs.ai.
Package: llmtranslator
# LLMTranslator[![PyPI version](https://img.shields.io/pypi/v/llmtranslator.svg)](https://pypi.python.org/pypi/llmtranslator)
[![Tests](https://github.com/rexwzh/llmtranslator/actions/workflows/test.yml/badge.svg)](https://github.com/rexwzh/llmtranslator/actions/workflows/test.yml/)
[![Documentation Status](https://img.shields.io/badge/docs-github_pages-blue.svg)](https://rexwzh.github.io/llmtranslator/)
[![Coverage](https://codecov.io/gh/rexwzh/llmtranslator/branch/main/graph/badge.svg)](https://codecov.io/gh/rexwzh/llmtranslator)Text translator using OpenAI-like API.
Package: llmux
LLMuxLarge language model inference for power users. At the current development stage it is more or less a ChatGPT CLI/TUI.Get startedInstallpipx install git+https://github.com/danisztls/llmuxGet an API keyGo toplatform.openai.comand log-in with your OpenAI account (register if you don't have one). Click on your name initial in the top-right corner, then select"View API keys". Finally click on"Create new secret key". That's it.You may also need to add a payment method, clicking onBilling --> Payment methods. New accounts should have some free credits, but adding a payment method may still be mandatory. For pricing, checkthis page.Configure API keyThere are three alternatives.a. Export the key as an env var:export OPENAI_API_KEY="<YOUR_KEY>"b. Create a global configuration at$XDG_CONFIG_HOME/llmux/config.yamlor a local at./llmux.yaml:api-key:"YOUR_KEY"c. Use the command line option--key <YOUR_KEY>.The configuration priority order is:Command line option > Environment variable > Local configuration file > Global configuration file.UsageRunllmux. Then just chat!The number next to the prompt is thetokensused in the conversation at that point.Use the/qcommand to quit and show the number of total tokens used and an estimate of the expense for that session, based on the specific model in use.Advanced configurationmodel:"gpt-3.5-turbo"markdown:falsemax_tokens:500temperature:1ModelsChatGPT CLI, by default, uses the originalgpt-3.5-turbomodel. In order to use other ChatGPT models, edit themodelparameter in theconfig.ymlfile ore use the--modelcommand line option. Here is a list of all the available options:NamePricing (input token)Pricing(output token)gpt-3.5-turbo0.00150.002gpt-3.5-turbo-06130.00150.002gpt-3.5-turbo-16k0.0030.004gpt-40.030.06gpt-4-06130.030.06gpt-4-32k0.060.12gpt-4-32k-06130.060.12Pricing is calculated as $/1000 tokens.Checkthis pagefor the technical details of each model.Advanced usageMultiline inputAdd the--multiline(or-ml) flag in order to toggle multi-line input mode. In this mode useAlt+EnterorEsc+Enterto submit messages.ContextUse the--context <FILE PATH>command line option (or-cas a short version) in order to provide the model an initial context (technically asystemmessage for ChatGPT). For example:llmux --context notes.txtBoth absolute and relative paths are accepted. Note that this option can be specified multiple times to give multiple files for context. Example:llmux --context notes-from-thursday.txt --context notes-from-friday.txtRestoring previous sessionsChatGPT CLI saves all the past conversations (including context and token usage) in$XDG_DATA_HOME/llmux. In order to restore a session the--restore <YYYYMMDD-hhmmss>(or-r) option is available. For example:llmux --restore 20230728-162302restores the session from the$XDG_DATA_HOME/llmux/session-20230728-162302.jsonfile. Then the chat goes on from that point.It is also possible to use the special valuelast:llmux --restore lastIn this case it restores the last chat session, without specifying the timestamp.Note that, if--restoreis set, it overwrites any--contextoption.
Package: llmwrite
LLM-Write (powered by GPT-3) :writing_hand:LLM make writing an article brazing fast :fire:.PyPi:https://pypi.org/project/llmwrite/:telescope: OverviewThis app is built with GPT-3.LLM-Write is the CLI tool for Intractive Automated Article Writing.You can create articles, just answer the questions.Since the language is specified in the LLM prompt and LLM is allowed to generate the text, it could theoretically be used in a variety of languages.However, the supported languages in the shell messages are only English and Japanese.:runner: Installationpipinstallllmwrite:computer: Usage# Set Environment "OPENAI_API_KEY"exportOPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxx# Rungptwrite
?Language?<SelectLanguage># ...(Lots of questions come in to the interactive.)
Package: lln-json-parser
Language Learning with Netflix JSON ParserParse the JSON export of your saved words and phrases in Language Learning with Netflix so you can use them with other systems (e.g. converting them into Anki flashcards).Free software: MIT licenseInstallationpip install lln-json-parserYou can also install the in-development version with:pip install https://github.com/coddingtonbear/lln-json-parser/archive/master.zipUsefromlln_json_parser.parserimportget_entrieswithopen('/path/to/lln_json_export.json','r')asinf:forentryinget_entries(inf):print(entry)The above will hand you a list ofSavedWordorSavedPhraseinstances -- you can find type definitions for what data is available by consulting thetypes.pyfile.
Package: llnl-hatchet
HatchetHatchet is a Python-based library that allowsPandasdataframes to be indexed by structured tree and graph data. It is intended for analyzing performance data that has a hierarchy (for example, serial or parallel profiles that represent calling context trees, call graphs, nested regions’ timers, etc.). Hatchet implements various operations to analyze a single hierarchical data set or compare multiple data sets, and its API facilitates analyzing such data programmatically.To use hatchet, install it with pip:$ pip install llnl-hatchetOr, if you want to develop with this repo directly, run the install script from
the root directory, which will build the cython modules and add the cloned
directory to yourPYTHONPATH:$ source install.shDocumentationSee theGetting Startedpage for basic examples and usage. Full documentation is available in theUser Guide.Examples of performance analysis using hatchet are availablehere.Thehatchet tutorialprovides a step by step introduction to hatchet features through a live interactive environment in BinderHub.Interactive VisualizationHatchet now provides an interactive visualization which can be run inside of your Jupyter notebooks. It is dependant on different mechanisms for building which we describe here:The software in thehatchet/vissubdirectory requiresNode.js and Node Package Managerfor the development and building of javascript code.Installing node packagesOne you have Node and NPM installed on your system, you can install all necessary node packages by running the following line in your terminal from thehatchet/vis/directory:npm installBuilding out javascript code with webpackTo build out javascript into the static bundles used by the Jupyter visualizations, run the following line from thehatchet/visdirectory in your terminal:npm run buildAlterntinatively if you are developing a visualization, you can run the following line to force bundles to automatically update when you change the javascript source code:npm run watchContributingHatchet is an open source project. We welcome contributions via pull requests,
and questions, feature requests, or bug reports via issues.AuthorsMany thanks go to Hatchet'scontributors.Citing HatchetIf you are referencing Hatchet in a publication, please cite the
followingpaper:Abhinav Bhatele, Stephanie Brink, and Todd Gamblin. Hatchet: Pruning
the Overgrowth in Parallel Profiles. In Proceedings of the International
Conference for High Performance Computing, Networking, Storage and Analysis
(SC '19). ACM, New York, NY, USA.DOILicenseHatchet is distributed under the terms of the MIT license.All contributions must be made under the MIT license.  Copyrights in the
Hatchet project are retained by contributors.  No copyright assignment is
required to contribute to Hatchet.SeeLICENSEandNOTICEfor details.SPDX-License-Identifier: MITLLNL-CODE-741008