semvec/pypi-packages huggingface dataset:
llm-falcon-model 0.7.0
Microlib for the Falcon LLM
Requires Python: >=3.8

# LLM Falcon model


`llm_falcon_model` allows you to run a part of a Falcon model as a standalone PyTorch module.
This enables you to run in distributed mode, using even old GPUs with less memory.

It only contains code needed for inference.
The only dependencies are `torch`, `tokenizers`, and `llm_sepweight`.

The original implementation is available [here](https://huggingface.co/tiiuae).


Use it when you cannot fit the whole Falcon model into memory. If you have multiple
old GPUs with less memory, you can run different parts of the Falcon model on each of them and when
you make them communicate (using for example `socket_rpc`), you can run the full model on multiple
heterogeneous hosts. For example, if you have 4 old gaming PCs with a 3090 card (~6000$), you can run Falcon 40B
real-time (5-6 tokens/s)

You can also use it when you want to run Falcon on a large number of inputs and have insufficient memory for the model.
You can serialize the intermediary results for all inputs and then continue with the next layers

Install with:

```bash
pip install llm_falcon_model
```

[![Downloads](https://static.pepy.tech/badge/llm_falcon_model/month)](https://pepy.tech/project/llm_falcon_model)
[![PyPi version](https://badgen.net/pypi/v/llm_falcon_model/)](https://pypi.com/project/llm_falcon_model)
[![PyPI license](https://img.shields.io/pypi/l/llm_falcon_model.svg)](https://pypi.python.org/pypi/llm_falcon_model/)

## Overview

The most important methods of this microlib are:
1. `llm_falcon_model.load_tokenizer()` - which loads an instance of the `Tokenizer` for the models
2. `llm_falcon_model.init_part(model_name, spec, device)` - which creates a part of a Falcon model, by a given name (`7b`, `40b` or `180b`),
part specification (which layers you want to load, see [sepweight part spec](https://microlib.org/llm_sepweight.html#load-state-dict-needed-for-a-part-of-the-llm))
and a PyTorch device.
3. `llm_falcon_model.generate` - which allows you to generate text based on a prompt.
4. `llm_falcon_model.score_batch` - which allows you to score a bunch of possible continuations based on a prompt.
5. `llm_falcon_model.run_part` - which allows you to run a part of Falcon in a distributed mode using `socket_rpc`

## Quick example


```python
import torch
import llm_falcon_model

tokenizer = llm_falcon_model.load_tokenizer()

separated_weights_path = '<PATH TO SEPARATED WEIGHTS>'

model = llm_falcon_model.init_part(
    model_name='40b',
    spec='b 0-12', # Load begin and layers 0 to 12
    device='cuda:0'
)

input_text = "The world chess champion Magnus Carlsen"
input_ids = tokenizer.encode(input_text).ids
batch = torch.tensor(input_ids).unsqueeze(0)
x = model(batch)

# x is now the result after end layer 12, shaped:
# torch.Size([1, 7, 8192])
```
pyhiir 1.0.0
Python wrapper for HIIR library

# pyhiir
use hiir (https://github.com/unevens/hiir) library in python 

HIIR is a DSP (digital signal processing) library in C++ which allows:
 - Changing the sampling rate of a signal by a factor of 2
 - Obtaining two signals with a pi/2 phase difference (Hilbert Transform)

 Pyhiir offers wrappers for the hiir methods in python. 

## Usage Examples

### Hilbert Transformer
```python
from pyhiir.hiir import hiir
from pyhiir.allpass import Hilbert
import matplotlib.pyplot as plt
import numpy as np
from scipy import signal

if __name__=='__main__':
    h = hiir()

    # compute filter coeficients for 40db attenuation 
    # and transition band of 10% of the sampling frequency
    c = h.compute_coefs(40, .1)

    # create a hilbert transformer with allpass chains
    h = Hilbert(c)

    fi, fq = h.get_transfer_function()
    wi, hi = signal.freqz(fi.b, fi.a, fs=2)
    wq, hq = signal.freqz(fq.b, fq.a, fs=2)

    # Plot the frequency response
    plt.plot(wi, (np.angle(hi)), color='r')
    plt.plot(wq, (np.angle(hq)), color='g')
    
    # plt.plot(wi, (np.angle(hi) - np.angle(hq)), color='y')

    plt.ylabel('Phase [rad]', color='r')
    plt.xlabel('Frequency')
    plt.tick_params('y', colors='r')
    plt.show()
    
    plt.plot(wi, np.abs(hi), color='r')
    plt.plot(wq, np.abs(hq), color='g')
    plt.xlabel('Frequency')
    plt.ylabel('Magnitude [db]')
    plt.ylim(0.95, 1.05)
    plt.show()
```
![Filter Response](doc/hilphas.png)
![Filter Response](doc/hilamp.png)


### Decimator Filter:

```python
from pyhiir.hiir import hiir
from pyhiir.allpass import LowPass
import matplotlib.pyplot as plt
import numpy as np
from scipy import signal

if __name__=='__main__':
    h = hiir()

    # compute filter coeficients for 120db attenuation 
    # and transition band of 1% of the sampling frequency
    c = h.compute_coefs(120, .01)

    # create an half-band low pass filter with allpass chains
    f = LowPass(c)

    # Now get the filter transfer function for plotting
    ff = f.get_transfer_function()
    w, h = signal.freqz(ff.b, ff.a)
    plt.grid(True)
    plt.xlabel("Normalized frequency")
    plt.ylabel("Amplitude [dB]")
    plt.plot(w / np.pi, 20 * np.log10(abs(h)), 'b')
    plt.show()
```
![Filter Response](doc/filter1.png)
python-pypi-mirror 5.2.1
A script to create a partial PyPI mirror
Requires Python: >=3.7

``pypi-mirror`` is a small script to generate a partial PyPI mirror. It
relies on ``pip`` to do the most difficult part of the job (downloading
a package and its dependencies).

Why?
====

Because most of the time you don't need a full PyPI mirror but only a
mirror that contains the packages you use. If you want a full PyPI
mirror you should look at `bandersnatch`_.

Installation
============

You can install ``pypi-mirror`` using ``pip``:

.. code:: sh

   pip install python-pypi-mirror

Or using ``conda``:

.. code:: sh

    conda install -c conda-forge python-pypi-mirror 

How to use it?
==============

The script provides several commands to manage your mirror. To find out
which commands are available, type:

.. code:: sh

   pypi-mirror --help

Every command provides its own help message. So for example to get the
help message of the ``download`` command, type:

.. code:: sh

   pypi-mirror download --help

The commands that you will probably use the most are the ``download``
command and the ``create`` command. For example to create a mirror which
contains the ``requests`` package and its dependencies, you can type the
following:

.. code:: sh

   pypi-mirror download -d downloads requests
   pypi-mirror create -d downloads -m simple

The first command will create a ``downloads`` directory into the current
directory and use ``pip`` to download the ``requests`` package and its
dependencies into the newly created directory. Then the ``create``
command will create a ``simple`` directory into the current directory
and will build the mirror inside this newly created directory. You can
add new packages by repeating this sequence of commands.

To make your mirror available through HTTP, you can point your HTTP
server of choice to the ``simple`` directory. For exemple, type the
following command into the current directory:

.. code:: sh

   python3 -m http.server

It will start a HTTP server that will serve file from the current
directory (which should contains the ``downloads`` directory and the
``simple`` directory). You can then install packages using your brand
new mirror using the following command:

.. code:: sh

   pip install -i http://127.0.0.1:8000/simple requests

About versioning
================

This package use `semver`_ to manage version numbering. It means that
every times the major number is increased a backward incompatible
change has been introduced in the API (the command line is an API). So
be careful when upgrading to a new major release as it will surely
break your scripts.

.. _bandersnatch: https://github.com/pypa/bandersnatch.git
.. _semver: https://semver.org/
django-robots 7.0b0
Robots exclusion application for Django, complementing Sitemaps.
Requires Python: >=3.7

=============
Django Robots
=============

.. image:: https://jazzband.co/static/img/badge.svg
   :target: https://jazzband.co/
   :alt: Jazzband
.. image:: https://github.com/jazzband/django-robots/workflows/Test/badge.svg
   :target: https://github.com/jazzband/django-robots/actions
.. image:: https://codecov.io/gh/jazzband/django-robots/branch/master/graph/badge.svg
  :target: https://codecov.io/gh/jazzband/django-robots
.. image:: https://img.shields.io/pypi/v/django-robots.svg
   :target: https://pypi.python.org/pypi/django-robots

This is a basic Django application to manage robots.txt files following the
`robots exclusion protocol`_, complementing the Django_ `Sitemap contrib app`_.

For installation instructions, see the documentation `install section`_;
for instructions on how to use this application, and on
what it provides, see the file "overview.txt" in the "docs/"
directory or on ReadTheDocs: https://django-robots.readthedocs.io/

Supported Django versions
-------------------------

* Django 4.0
* Django 3.2
* Django 3.1
* Django 2.2

For older Django versions (1.6-1.10) use ``django-robots==3.0``.
for Django 2 and above, use ``django-robots>=4.0.0``.

Supported Python version
------------------------

* Python 3.7, 3.8, 3.9, 3.10

.. _install section: https://django-robots.readthedocs.io/en/latest/#installation
.. _robots exclusion protocol: http://en.wikipedia.org/wiki/Robots_exclusion_standard
.. _Django: http://www.djangoproject.com/
.. _Sitemap contrib app: http://docs.djangoproject.com/en/dev/ref/contrib/sitemaps/