> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ecopi.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get started with InternTA in under 5 minutes

## Local Setup

Learn how to set up and run InternTA locally.

### Prerequisites

<AccordionGroup>
  <Accordion icon="microchip" title="Hardware Requirements">
    * NVIDIA GPU with 8GB or more VRAM
    * Sufficient disk space for model storage
  </Accordion>

  <Accordion icon="box" title="Software Requirements">
    ```bash theme={null}
    # Install the required dependencies
    pip install -r requirements.txt
    ```
  </Accordion>
</AccordionGroup>

### Quick Installation

<CodeGroup>
  ```bash Clone Repository theme={null}
  # Clone the repository
  git clone https://github.com/kongfoo-ai/internTA

  # Go to the project directory
  cd InternTA

  # Install the dependencies
  pip install -r requirements.txt
  ```

  ```bash Start Demo theme={null}
  # Start the demo (Default port: 8080)
  sh run.sh

  # View run logs 
  tail -f nohup.out
  ```
</CodeGroup>

## API Integration

### Authentication

To use the InternTA API, you'll need to include a bearer token in your requests:

```bash theme={null}
curl -X POST "https://api.ecopi.chat/v1/chat/completions" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "internta-v02",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Can you teach me some synthetic biology?"}
    ]
  }'
```

### Example Response

```json theme={null}
{
  "id": "chatcmpl-1753709210352",
  "object": "chat.completion",
  "created": 1753709210,
  "model": "internta-v02",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Sure! Synthetic biology is an interdisciplinary field that combines biology, engineering, and computer science to design and construct new biological parts, devices, and systems. Here are some key concepts and areas within synthetic biology:\n\n1. **Basic Concepts**:\n   - **DNA as a Programming Language**: In synthetic biology, DNA is often viewed as a code that can be manipulated to create new functions in organisms.\n   - **Genetic Engineering**: Techniques like CRISPR-Cas9 allow scientists to edit genes with precision, enabling the modification of organisms for desired traits.\n\n2. **Key Techniques**:\n   - **Gene Synthesis**: The process of artificially creating genes in the lab, allowing for the design of new genetic sequences.\n   - **Pathway Engineering**: Modifying metabolic pathways in organisms to produce desired compounds, such as biofuels or pharmaceuticals.\n   - **Synthetic Circuits**: Creating genetic circuits that can control gene expression in response to specific signals, similar to electronic circuits.\n\n3. **Applications**:\n   - **Medicine**: Developing new therapies, vaccines, and diagnostic tools. For example, engineered bacteria can be used to produce insulin.\n   - **Agriculture**: Creating genetically modified crops that are resistant to pests or have enhanced nutritional value.\n   - **Environmental**: Engineering microbes to degrade pollutants or capture carbon dioxide.\n\n4. **Ethical Considerations**:\n   - The manipulation of life forms raises ethical questions about safety, biodiversity, and the potential consequences of releasing engineered organisms into the environment.\n\n5. **Future Directions**:\n   - Advances in synthetic biology could lead to breakthroughs in personalized medicine, sustainable energy, and innovative materials.\n\nIf you have specific topics or questions within synthetic biology that you'd like to explore further, feel free to ask!"
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 100,
    "completion_tokens": 10,
    "total_tokens": 110
  },
  "system_fingerprint": "fp_2f57f81c11"
}
```

## Advanced Usage

### Training Your Own Model

<AccordionGroup>
  <Accordion icon="database" title="1. Generate Training Data">
    ```bash theme={null}
    # Go to the data directory
    cd data

    # Generate training data
    python generate_data.py
    ```
  </Accordion>

  <Accordion icon="gear" title="2. Fine-tune the Model">
    ```bash theme={null}
    # From project root
    cd $ROOT_PATH

    # Start fine-tuning
    sh train.sh
    ```
  </Accordion>

  <Accordion icon="code-merge" title="3. Merge Model Weights">
    ```bash theme={null}
    # Merge the fine-tuned Adapter
    sh merge.sh $NUM_EPOCH
    ```
  </Accordion>

  <Accordion icon="vial" title="4. Test the Model">
    ```bash theme={null}
    # Test the merged model
    sh chat.sh
    ```
  </Accordion>
</AccordionGroup>

### Model Evaluation

To evaluate the model's performance:

```bash theme={null}
# Run evaluation tests
pytest ./test/test_model_evaluation.py
```

This will generate a `test_results.csv` file containing ROUGE similarity scores for model responses.

## Resources

<CardGroup>
  <Card title="Model Repository" icon="box-archive" href="https://openxlab.org.cn/models/detail/Kongfoo_EC/internTA">
    Access the model on OpenXLab
  </Card>

  <Card title="Live Demo" icon="play" href="https://ecopi.chat">
    Try the online demo
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    View the complete API documentation
  </Card>

  <Card title="GitHub" icon="github" href="https://github.com/kongfoo-ai/internTA">
    Access the source code
  </Card>
</CardGroup>
