{"id":22433207,"url":"https://github.com/andresWeitzel/Modulo_GPT-J-6B_NLP","last_synced_at":"2025-12-30T21:29:09.948Z","repository":{"id":129669735,"uuid":"568272247","full_name":"andresWeitzel/Modulo_GPT-J-6B_NLP_NodeJs","owner":"andresWeitzel","description":"Módulo para el Procesamiento de Lenguaje Natural de código abierto (GPT-J-6B).","archived":false,"fork":false,"pushed_at":"2024-03-16T10:54:47.000Z","size":213,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T12:46:17.299Z","etag":null,"topics":["git","gpt-j-6b","ia","nlp","nlp-machine-learning","nodejs","npm","procesamiento-lenguaje-natural","vsc"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andresWeitzel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-20T01:31:46.000Z","updated_at":"2023-05-26T04:13:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"79fbde55-653a-4dbe-8b94-b6184fc74dcd","html_url":"https://github.com/andresWeitzel/Modulo_GPT-J-6B_NLP_NodeJs","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresWeitzel%2FModulo_GPT-J-6B_NLP_NodeJs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresWeitzel%2FModulo_GPT-J-6B_NLP_NodeJs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresWeitzel%2FModulo_GPT-J-6B_NLP_NodeJs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresWeitzel%2FModulo_GPT-J-6B_NLP_NodeJs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andresWeitzel","download_url":"https://codeload.github.com/andresWeitzel/Modulo_GPT-J-6B_NLP_NodeJs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245806381,"owners_count":20675296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","gpt-j-6b","ia","nlp","nlp-machine-learning","nodejs","npm","procesamiento-lenguaje-natural","vsc"],"created_at":"2024-12-05T22:14:17.188Z","updated_at":"2025-12-30T21:29:09.942Z","avatar_url":"https://github.com/andresWeitzel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Index app](https://github.com/andresWeitzel/Modulo_GPT-J_NLP_NodeJs/blob/master/doc/assets/img/brain.jpg)\n\n\u003cdiv align=\"right\"\u003e\n  \u003cimg width=\"27\" height=\"27\" src=\"./doc/assets/icons/devops/png/postman.png\" /\u003e\n  \u003cimg width=\"29\" height=\"27\" src=\"./doc/assets/icons/devops/png/git.png\" /\u003e\n  \u003cimg width=\"27\" height=\"27\" src=\"./doc/assets/icons/backend/javascript-typescript/png/nodejs.png\" /\u003e\n  \u003cimg width=\"27\" height=\"27\" src=\"./doc/assets/icons/artificial-intelligence/png/ia-bot.png\" /\u003e\n  \u003cimg width=\"27\" height=\"27\" src=\"./doc/assets/icons/artificial-intelligence/png/ia-robot.png\" /\u003e\n  \u003cimg width=\"27\" height=\"27\" src=\"./doc/assets/icons/artificial-intelligence/png/ia-human.png\" /\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"right\"\u003e\n    \u003ca href=\"./translation/README.es.md\" target=\"_blank\"\u003e\n      \u003cimg src=\"./doc/assets/icons/translation/arg-flag.jpg\" width=\"10%\" height=\"10%\" /\u003e\n  \u003c/a\u003e \n   \u003ca href=\"./README.md\" target=\"_blank\"\u003e\n      \u003cimg src=\"./doc/assets/icons/translation/eeuu-flag.jpg\" width=\"10%\" height=\"10%\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# GPT-J-6B_NLP_Module ![(status-completed)](./doc/assets/icons/badges/status-completed.svg)\n\n\u003c/div\u003e  \n\nOpen source module for Natural Language Processing based on GPT-J-6B, a language model developed by EleutherAI as an alternative to GPT-3. It allows generating text, translating, answering questions and completing code through the Banana.dev API.\n\n*   [GPT-J-6B Guide](https://huggingface-co.translate.goog/EleutherAI/gpt-j-6b?_x_tr_sl=en\u0026_x_tr_tl=es\u0026_x_tr_hl=es\u0026_x_tr_pto=tc)\n*   [NPM package gpt-j](https://www.npmjs.com/package/gpt-j)\n*   [Playlist functionality test](https://www.youtube.com/watch?v=GddMV140leA\u0026list=PLCl11UFjHurDYl5a2CQOkrMx4HWamPuZI) \u003ca href=\"https://www.youtube.com/watch?v=GddMV140leA\u0026list=PLCl11UFjHurDYl5a2CQOkrMx4HWamPuZI\" target=\"_blank\"\u003e \u003cimg src=\"./doc/assets/icons/social-networks/yt.png\" width=\"5%\" height=\"5%\" /\u003e \u003c/a\u003e\n\n\n\n\u003cbr\u003e\n\n## Index 📜\n\n\u003cdetails\u003e\n \u003csummary\u003e See \u003c/summary\u003e\n\n \u003cbr\u003e\n\n### Section 1) Description, configuration and technologies.\n\n*   [1.0) Project description.](#10-project-description-)\n*   [1.1) Project status.](#11-project-status-)\n*   [1.2) Technologies used.](#12-technologies-used-)\n*   [1.3) Required dependencies.](#13-required-dependencies-)\n\n### Section 2) Project execution and testing\n\n*   [2.0) Project setup.](#20-project-setup-)\n*   [2.1) NPM package execution.](#21-npm-package-execution-)\n*   [2.2) Environment variables.](#22-environment-variables-)\n\n### Section 3) Documentation and resources\n\n*   [3.0) GPT-J documentation.](#30-gpt-j-documentation-)\n*   [3.1) Video tutorials.](#31-video-tutorials-)\n*   [3.2) References.](#32-references-)\n\n\u003cbr\u003e\n\n\u003c/details\u003e\n\n\u003cbr\u003e\n\n\n\n## Section 1) Description, configuration and technologies.\n\n### 1.0) Project description.\n\n\u003cdetails\u003e\n\u003csummary\u003eSee\u003c/summary\u003e\n\n\u003cbr\u003e\n\nOpen source Natural Language Processing module. GPT-J-6B is a 6 billion parameter language model trained using Mesh Transformer JAX. It was developed by EleutherAI as an open source alternative to GPT-3. The model can perform tasks such as text generation, translation, answering questions and code completion. This module provides a simple interface to interact with GPT-J-6B through the Banana.dev API.\n\n\u003cbr\u003e\n\n\u003c/details\u003e\n\n### 1.1) Project status.\n\n\u003cdetails\u003e\n\u003csummary\u003eSee\u003c/summary\u003e\n\n\u003cbr\u003e\n\n![(status-completed)](./doc/assets/icons/badges/status-completed.svg)\n\n\u003cbr\u003e\n\n\u003c/details\u003e\n\n### 1.2) Technologies used.\n\n\u003cdetails\u003e\n\u003csummary\u003eSee\u003c/summary\u003e\n\n\u003cbr\u003e\n\n- **Node.js** - JavaScript Runtime\n- **Banana.dev API** - AI model inference service\n- **GPT-J-6B** - 6 billion parameter language model\n- **NPM** - Package manager\n\n\u003cbr\u003e\n\n\u003c/details\u003e\n\n### 1.3) Required dependencies.\n\n\u003cdetails\u003e\n\u003csummary\u003eSee\u003c/summary\u003e\n\n\u003cbr\u003e\n\n```json\n{\n  \"@banana-dev/banana-dev\": \"3.0.0\"\n}\n```\n\n\u003cbr\u003e\n\n\u003c/details\u003e\n\n\u003cbr\u003e\n\n## Section 2) Project execution and testing.\n\n### 2.0) Project setup.\n\n\u003cdetails\u003e\n\u003csummary\u003eSee\u003c/summary\u003e\n\n\u003cbr\u003e\n\n#### Project cloning\n\n```bash\ngit clone https://github.com/andresWeitzel/Api_GPT-J_NLP_NodeJs\ncd Modulo_GPT-J-6B_NLP_NodeJs\n```\n\n#### Dependencies installation\n\n```bash\nnpm install @banana-dev/banana-dev@3.0.0\n```\n\n\u003cbr\u003e\n\n\u003c/details\u003e\n\n### 2.1) NPM package execution.\n\n\u003cdetails\u003e\n\u003csummary\u003eSee\u003c/summary\u003e\n\n\u003cbr\u003e\n\n#### NPM package installation\n\n```bash\nnpm i gpt-j\n```\n\n#### Basic usage\n\n```js\nconst modelRunner = require('gpt-j');\nconst apiKey = 'XXXX'\nconst modelKey = 'gptj'\n\nmodelRunner.run('hello', apiKey, modelKey);\n```\n\n\u003cbr\u003e\n\n\u003c/details\u003e\n\n### 2.2) Environment variables.\n\n\u003cdetails\u003e\n\u003csummary\u003eSee\u003c/summary\u003e\n\n\u003cbr\u003e\n\n#### Environment variables configuration\n\nCreate `config.js` file:\n\n```js\nmodule.exports = {\n    API_KEY: process.env.API_KEY || \"xxxx\",\n    MODEL_KEY: process.env.MODEL_KEY || \"gptj\"\n}\n```\n\n#### Implementation with environment variables\n\n```js\nconst config = require('config.js');\nconst modelRunner = require('gpt-j');\n\n//keys\nconst apiKey = config.API_KEY;\nconst modelKey = config.MODEL_KEY;\n\nmodelRunner.run('hello', apiKey, modelKey);\n```\n\n**IMPORTANT**: Create a `.gitignore` file to exclude the `config.js` file\n\n\u003cbr\u003e\n\n\u003c/details\u003e\n\n\u003cbr\u003e\n\n## Section 3) Documentation and resources.\n\n### 3.0) GPT-J documentation.\n\n\u003cdetails\u003e\n\u003csummary\u003eSee\u003c/summary\u003e\n\n\u003cbr\u003e\n\n#### Model Parameters\n\n##### Input (text param)\nCorresponds to the input layer that the model will analyze (Ex: `generate two functions in javascript`)\n\n##### Text Length (length param)\nThe output text length is measured in tokens, these are common character sequences that are found through the model core. The higher the number, the more text and information we will get in the output.\n\n##### Temperature Adjustment (temperature param)\nTemperature determines the exhaustiveness of the generative model.\n- Setting low temperature values leads to a safer model.\n- Setting high temperature values leads to a more unstable model.\n\n##### Batch Size (batchSize param)\nImplemented for GPU performance.\n\n##### Parameters Example\n\n```js\n{\n    \"text\": \"i want to know the current temperature\",\n    \"length\": 250,\n    \"temperature\": 0.9,\n    \"batchSize\": 1\n}\n```\n\n#### Model Layer Model Parameters implemented (Setup)\n\n```js\nmodule.exports.set = (text, length, temp, batch) =\u003e {\n    const params = {\n        \"text\": text,\n        \"length\": length,\n        \"temperature\": temp,\n        \"batchSize\": batch\n    }\n    return params;\n}\n```\n\n#### Model Layer Runner implemented (Execution)\n\n**Input**: `I want to know the current temperature in Buenos Aires, Argentina`\n\n```js\n//Imports\nconst gptCore = require('@banana-dev/banana-dev');\nconst config = require('../configs/config.js');\nconst modelParameters = require('../models/modelParameters');\n\n//keys\nconst apiKey = config.API_KEY;\nconst modelKey = config.MODEL_KEY;\n\n//Params\nlet text = \"I want to know the current temperature in Buenos Aires, Argentina\"\nlet length = 400\nlet temperature = 0.7\nlet batchSize = 1\n\nlet params = modelParameters.set(text, length, temperature, batchSize);\n\nlet run = async (params) =\u003e {\n    try {\n        var out = await gptCore.run(apiKey, modelKey, params)\n        console.log(out)\n        return out\n    } catch (error) {\n        console.log(error);\n    }\n}\n\nrun(params)\n```\n\n#### GPT-J Core Output (Response)\n\n```terminal\n{\n    message: 'success',\n    created: 1668961622,\n    apiVersion: '26 Nov 2021',\n    modelOutputs: [\n        {\n            output: '\\n' +\n                '\\n' +\n                'Buenos Aires has a very high temperature in summer. If you are a person who lives in Argentina and would like to know what the heat rate is in Buenos Aires, I present my method to know the current temperature in Buenos Aires.\\n' +\n                '\\n' +\n                'You don\\'t need a GPS to know the current temperature\\n' +\n                '\\n' +\n                'Yes, it\\'s true, you can know the current temperature at any point in the city in a few seconds. All the information you need is in the following tables.\\n' +\n                '\\n' +\n                'To know the current temperature in Buenos Aires, you need to know the temperature of the city area where you are now. If you are in the city, the heat rate in Buenos Aires is quite similar. However, if you are at a point in the city outside the center, the temperature will be higher.\\n' +\n                '\\n' +\n                'To know the temperature of the area where you are now, you simply need to know your location point. For example, if you are in the city of Buenos Aires, then you need to know your location point to know the temperature of Buenos Aires.\\n' +  \n                '\\n' +\n                'To know your location point, you don\\'t need a GPS. You just need to know your address and your speed. The address and speed are the two coordinates of your position.',\n            input: 'I want to know the current temperature in Buenos Aires, Argentina'\n        }\n    ],\n    callID: 'call_4a3b9440-fcb6-4122-b269-6ac55a46c3eb'\n}\n```\n\n\u003cbr\u003e\n\n\u003c/details\u003e\n\n### 3.1) Video tutorials.\n\n\u003cdetails\u003e\n\u003csummary\u003eSee\u003c/summary\u003e\n\n\u003cbr\u003e\n\n#### [Watch Functional test playlist](https://www.youtube.com/watch?v=GddMV140leA\u0026list=PLCl11UFjHurDYl5a2CQOkrMx4HWamPuZI)\n\n  \u003ca href=\"https://www.youtube.com/watch?v=GddMV140leA\u0026list=PLCl11UFjHurDYl5a2CQOkrMx4HWamPuZI\"\u003e\n    \u003cimg src=\"./doc/assets/img/yt_playlist.png\" /\u003e\n  \u003c/a\u003e \n\n\u003cbr\u003e\n\n\u003cbr\u003e\n\n\u003c/details\u003e\n\n### 3.2) References.\n\n\u003cdetails\u003e\n\u003csummary\u003eSee\u003c/summary\u003e\n\n\u003cbr\u003e\n\n#### GPT-J-6B Core API\n* [Base Example](https://www.banana.dev/pretrained-models/nodejs/gptj)\n* [Generate Api Key](https://app.banana.dev/)\n* [Models](https://www.banana.dev/pretrained-models/nodejs)\n* [Banana API Documentation](https://docs.banana.dev/)\n* [Pricing and Plans](https://www.banana.dev/pricing)\n\n#### Core Original GTP-J-6B (Mesh Transformer JAX)\n* (The Core with the unoptimized model weighs 6gb. With the Optimized Model 61gb).\n* [Repository](https://github.com/kingoflolz/mesh-transformer-jax/#mesh-transformer-jax)\n* [Original Paper](https://arxiv.org/abs/2104.04473)\n* [Blog EleutherAI](https://blog.eleuther.ai/gpt-j-6b/)\n* [Model on HuggingFace](https://huggingface.co/EleutherAI/gpt-j-6B)\n\n#### Additional documentation\n* [GPT-J-6B Guide](https://huggingface-co.translate.goog/EleutherAI/gpt-j-6b?_x_tr_sl=en\u0026_x_tr_tl=es\u0026_x_tr_hl=es\u0026_x_tr_pto=tc)\n* [NPM package gpt-j](https://www.npmjs.com/package/gpt-j)\n* [Implementation Tutorial](https://www.youtube.com/watch?v=jlogLBkPZ2A)\n* [Comparison with other models](https://www.eleuther.ai/artifacts/gpt-j-6b)\n* [JAX Documentation](https://jax.readthedocs.io/)\n* [Mesh Transformer JAX Wiki](https://github.com/kingoflolz/mesh-transformer-jax/wiki)\n\n\u003cbr\u003e\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FandresWeitzel%2FModulo_GPT-J-6B_NLP","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FandresWeitzel%2FModulo_GPT-J-6B_NLP","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FandresWeitzel%2FModulo_GPT-J-6B_NLP/lists"}