--- language: - en license: apache-2.0 library_name: transformers tags: - python - java - cpp - sql - function calling - unit tests - causalLM - codeLLAMA modified archi - document - code - code2doc - instruction_tuned - basemodel - pytorch - docstring - documentation - text-generation-inference metrics: - accuracy pipeline_tag: text-generation widget: - text: '--code:def function_divide2(x): return x / 2--question:Document the code--doc:Description:This function takes a number and divides it by 2.Parameters:- x (numeric): The input value to be divided by 2.Returns:- float: The result of x divided by 2.Example:To call the function, use the following code:function_divide2(1.0)def _plot_bounding_polygon(polygons_coordinates, output_html_path=bounding_polygon_map.html):map_center = [sum([coord[0]for polygon_coords in polygons_coordinatesfor coord in polygon_coords])/ sum([len(polygon_coords) for polygon_coords in polygons_coordinates]),sum([coord[1]for polygon_coords in polygons_coordinatesfor coord in polygon_coords])/ sum([len(polygon_coords) for polygon_coords in polygons_coordinates]),]my_map = folium.Map(location=map_center, zoom_start=12)for polygon_coords in polygons_coordinates:folium.Polygon(locations=polygon_coords,color=blue,fill=True,fill_color=blue,fill_opacity=0.2,).add_to(my_map)marker_cluster = MarkerCluster().add_to(my_map)for polygon_coords in polygons_coordinates:for coord in polygon_coords:folium.Marker(location=[coord[0], coord[1]], popup=fCoordinates: {coord}).add_to(marker_cluster)draw = Draw(export=True)draw.add_to(my_map)my_map.save(output_html_path)return output_html_pathDocument the python code above giving function description ,parameters and return type and example how to call the function' example_title: example --- # pip-library-etl-1.3b [pipableAi](https://www.pipable.ai/) [colab_notebook](https://colab.research.google.com/drive/10av3SxFf0Psx_IkmZbcUhiVznStV5pVS?usp=sharing) [pip flow]() [linkedin_post]() [reddit_post]() ## Objective ![image/png](https://cdn-uploads.huggingface.co/production/uploads/658d8095a2a6a6e0da8bb8a6/NuTFBTMAsPgFwMxCjdqFv.png) Given a goal and tools can Ai intelligently use the tools to reach the goal ? What if it has a meagre 1.3b params/neurons akin to that of an owl ? Can it follow instructions and plan to reach a goal ? Apparently it can. Releasing `pip-code-bandit` and `pip_flow` a model and a library to manage and run goal oriented agentic system. ## Model attributes ```javascript -- number of params ~ 1.3b [2.9 Gb GPU memory footprint] -- sequence length ~ 16.3k [Can go higher but will show performance degradation] -- license - apache 2.0 -- tasks: 1. complex planning of sequential function calls with right params to accomplish a goal | a list of callables 2. function calling | doc or code and goal 3. code generation | plan and goal 4. code generation | goal 5. doc generation | code 6. code generation | doc 7. file recreated in json | any raw data 8. corrected generation | new instruction with error -- instruction following , RL tuned. ``` ## How we built it? We used a simulator to simulate environments where the model could play games to achieve goals, given a set of actions available to it. All the model could do was find the right action and config to incur positive reward. The reward policy is around the concept of model going to a stable state of zero net sum reward for both good and bad behaviour. In this set up the model, which was pre trained on code , function documentation and similar OS datasets ,was RL tuned for instruction following and reliability. ## License ```bash The model is open source under apache 2.0. License ``` ## Usage ### NOTE: ### Library use For directly using the capabilities of model without putting extra efforts on schems and prompts try to use [pip flow](). Here's a brief overview of what can be achieved using the PipEtl library: - `Function Call Generation` : The generate_function_call method facilitates the generation of Python function calls based on provided questions and either docstrings or undocumented code. This feature can be useful for generating example function calls or for prototyping code snippets. - `Automated Documentation Generation` : With the generate_docstring method, users can automatically generate comprehensive docstrings for Python functions. This feature aids in maintaining well-documented codebases and adhering to best practices. - `Module Documentation` : The generate_module_docstrings method allows for generating documentation for all methods and functions within a given module or package. This capability streamlines the documentation process, especially for large codebases with numerous functions. - `SQL Query Generation` : Users can leverage the generate_sql method to automatically generate SQL queries based on provided schemas and questions. This functionality simplifies the process of creating SQL queries, particularly for data-related tasks. For detailed usage refer to the [colab_notebook](https://colab.research.google.com/drive/10av3SxFf0Psx_IkmZbcUhiVznStV5pVS?usp=sharing) ### Installation ```bash pip install transformers ``` ### Prompt ### Team ```doc Avi Kothari, Gyan Ranjan, Pratham Gupta, Ritvik Aryan Kalra, Soham Acharya ```