semvec/pypi-packages huggingface dataset:
mpanalyze 0.3
A package for analyzing model parameters

# Model Parameters Analyzer

This is a Python package that helps you analyze the parameters of your models. It calculates the number of parameters in the model and their percentages than generate analyze JSON file and charts for you.

## 中文介绍

这是一个可帮助您分析模型参数的Python包。它计算模型中的参数数量及其百分比，然后为您生成分析 JSON 文件和图表。  
快速安装: `pip install mpanalyze`  
简单使用: `import mpanalyze` `mpanalyze.params_analyze(${model})`  
详细参数参考 [Usage](#Usage)

## Porject Displays

![tree](./display/tree.jpg)
![treemap](./display/treemap.jpg)

## Installation

To install this package, you can use pip:

```sh
pip install mpanalyze
```

## Usage

You can use this package from the command line with the follow command:

```python
import mpanalyze
mpanalyze.params_analyze(${model})
```

* More parameters for params_analyze   
`model`: object | The model to analyze.  
`name`: str(Optional) | The name of the model. It will add to the analyze dir begin. If not specified, the directory name will be 'params_analyze'.  
`port`: int(Opetional) | The port to use for the HTTP server. If not specified, the browser will not be opened. Recommended only use in Debug mode. If you want to use in training, it will block the training process.  
`save_dict`: bool(Optional) | Whether to save the parameters to a JSON file. Default is True.
`tree`: bool(Optional) | Whether to draw a tree chart. Default is True.  
`treemap`: bool(Optional) | Whether to draw a TreeMap chart. Default is True.  

Only get analyze aict:  

```python
param_dict = calculate_dict(model)
```

This will calculate the parameters and their percentages for your model.  

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License. See the `LICENSE` file for details.
svd-training 0.0.2
A training helper for LLM.

# Using Singular Value Decomposition (SVD) to reduce the dimensionality of the trainable parameters in a neural network

## Introduction
TBD

## Usage

```python
from transformers import AutoTokenizer, AutoModelForCausalLM
from svd_training.svd_model import SVDForCausalLM

filename = "mistralai/Mistral-7B-Instruct-v0.1"
tokenizer = AutoTokenizer.from_pretrained(filename)
model = AutoModelForCausalLM.from_pretrained(filename)

svd_model = SVDForCausalLM.create_from_model(model, rank_fraction=0.1) # Create the SVD model

### Train the model using your favourite training loop
...
###

svd_model.merge()  # Merge the SVD layers back into the model
svd_model.save_pretrained("svd_model/")  # Save the model
```
LLMSmith 0.8.0
Lightweight Python library designed for developing functionalities powered by Large Language Models (LLMs)
Requires Python: <3.13,>=3.9

# 🧰 LLMSmith

## What is LLMSmith?

**LLMSmith** is a lightweight Python library designed for developing functionalities powered by Large Language Models (LLMs). It allows developers to integrate LLMs into various types of applications, whether they are web applications, GUI applications, or any other kind of application.

## Installation

LLMSmith does not download extra dependencies (like openai, google-generativeai, chromadb etc.) by default. This is to minimize bloat and keep your application package size in check. The recommended way to install LLMSmith is by specifying the extra dependencies explicitly.

For example, if your project is using an OpenAI LLM and Chroma DB vector database, install LLMSmith using the below command.

```
pip install "llmsmith[openai,chromadb]"
```

The above command ensures that only the required dependencies (openai and chromadb clients in this case) are downloaded. The rest are ignored, thus reducing the package size.

Here's the list of extra dependencies supported by LLMSmith:
- `openai`
- `claude`
- `gemini`
- `chromadb`
- `qdrant`
- `cohere`
- `pinecone`
- `groq`
- `pgvector`
- `all` (downloads all extra dependencies)

## Example

Refer [this](https://llmsmith.readthedocs.io/en/latest/examples.html) page from the documentation to see examples on how LLMSmith can be used to build LLM powered functionalities.

## Documentation

An extensive documentation for LLMSmith is hosted in Read the Docs here - [https://llmsmith.readthedocs.io/en/latest](https://llmsmith.readthedocs.io/en/latest)
ellipsisPySpark 0.0.0
Package to load Ellipsis raster and vector layers as pySpark DataFrames.
Requires Python: >=3.6

This package is meant to help you run models on Ellipsis Drive content. It should be used in combination with the ellipsis package.


### Synopsis
A package to parse Ellipsis Drive layers as pySpark DataFrames.

### Install
```python
pip install ellipsisPySpark
```

### Example
```python
from pyspark.sql import SparkSession
from ellipsisPySpark import readVector
from ellipsisPySpark import readRaster

#pathId, timestampId and token as can be obtained via the Ellipsis Drive interface via 'integrate'
pathId = '632aeb3f-ca77-4bdd-a8cd-5f733dbd87ee'
timestampId = 'da3bb83d-8cc0-45e4-a96d-e6db0f83616b'
token = 'epat_MY2lyE9txCGaWHxUt1CXkLnMUoAWpgkepma3XqzlranvhcpY8CaByBAaBpOybKOK'

sparkSession = SparkSession.builder.appName('tutorial').getOrCreate()

#read the vector layer as a spark dataframe
spark_df = readVector(sparkSession= sparkSession, pathId=pathId, timestampId=timestampId, token=token)


#pathId, timestampId and token as can be obtained via the Ellipsis Drive interface via 'integrate'
pathId = 'd951d941-3340-4a81-a7a3-f87e3651f83c'
timestampId = 'c6d976d8-7fc3-4ff4-80d9-734928701e24'
token = 'epat_Fr2QlosaiN0M0tGEWhlRlPhLnmOP5xP0OuPq1ca6kzgtRF6D3l4Bd94lOSu7RcQ8'

#read the raster layer as a spark dataframe
spark_df = readRaster(sparkSession= sparkSession, pathId=pathId, timestampId=timestampId, token=token)


```


### Functions

#### readVector

```python
readVector(sparkSession, pathId, timestampId, token=None)
```

This function parses an Ellipsis Drive vector layer as a pySpark DataFrame

| Name        | Description |
| ----------- | -----------|
| sparkSession        | A session as created using pySpark. |
| pathId        | The id of the vector layer to load as a pySpark dataframe |
| timestampId        | The id of the timestamp to load as a pySpark dataframe |
| token        | A token to authenticate (optional)|


#### readRaster

```python
readRaster(sparkSession, pathId, timestampId, token= None, extent = None)
```

This function parses an Ellipsis Drive vector layer as a pySpark DataFrame

| Name         | Description                                               |
|--------------|-----------------------------------------------------------|
| sparkSession | A session as created using pySpark.                       |
| pathId       | The id of the raster layer to load as a pySpark dataframe |
| timestampId  | The id of the timestamp to load as a pySpark dataframe    |
| token        | A token to authenticate (optional)                        |
| extent       | The extent to restrict to in WGS84 (optional)             |
yaz-pyutils 0.0.1
PyUtils is a Python utility package that provides functions for generating random numbers, alphanumeric strings, alphabetic strings, hashed strings, and more. This package can be useful for developers who need to generate random data for various purposes such as testing, seeding databases, or creating random tokens.
Requires Python: >=3.10

# yaz-pyutils

`yaz-pyutils` is a Python utility package that provides functions for generating random numbers, alphanumeric strings, alphabetic strings, hashed strings, and more. This package can be useful for developers who need to generate random data for various purposes such as testing, seeding databases, or creating random tokens.

## Installation

You can install `random_utils` via pip:

```bash
pip install random_utils
```