Virtual serial line on linux with socat, python server & client
socat -d -d pty,raw,echo=0,link=/tmp/cryocon_simulator pty,raw,echo=0,link=/tmp/cryocon
| #ifndef U_TEST_H | |
| #define U_TEST_H | |
| #include <stdio.h> | |
| #include <stdbool.h> | |
| #include <string.h> | |
| // Colored output macros | |
| #define ANSI_COLOR_RED "\x1b[31m" | |
| #define ANSI_COLOR_GREEN "\x1b[32m" |
| #include <stdio.h> | |
| #include <stdlib.h> // for malloc | |
| #include <memory.h> | |
| #include <stdbool.h> | |
| #include <assert.h> // In order to use: assert() | |
| // 1. Use typedefs | |
| typedef struct cat { char* name; } cat; | |
| // 2. Use sized types |
| import modal | |
| vllm_image = modal.Image.debian_slim(python_version="3.10").pip_install( | |
| [ | |
| "vllm==0.5.3post1", # LLM serving | |
| "huggingface_hub==0.24.1", # download models from the Hugging Face Hub | |
| "hf-transfer==0.1.8", # download models faster | |
| ] | |
| ) |
| #!/bin/bash | |
| # Prompt for email and name | |
| read -p "Enter your GitHub email: " email | |
| read -p "Enter your full name: " name | |
| # Generate SSH key | |
| ssh-keygen -t ed25519 -C "$email" -f ~/.ssh/id_ed25519 -N "" | |
| # Start SSH agent and add key |
| #agentic.py | |
| # https://discord.com/channels/1192246288507474000/1192247523604185189/1229828123764330577 | |
| from pydantic import BaseModel, Field | |
| from typing import List | |
| class Agent(BaseModel): | |
| variable: str = Field(description="snake cased variable based off the agents role") | |
| role: str = Field(description="The role of the agent", examples=["Senior Project Manager","Lead Developer","Senior Architect"]) |
| models: | |
| - model: NousResearch/Llama-2-70b-hf | |
| # no parameters necessary for base model | |
| - model: wanglab/ClinicalCamel-70B | |
| parameters: | |
| weight: 0.08 | |
| density: 0.45 | |
| - model: epfl-llm/meditron-70b | |
| parameters: | |
| weight: 0.08 |
| models: | |
| - model: NousResearch/Nous-Hermes-Llama2-13b | |
| # no parameters necessary for base model | |
| - model: starmpcc/Asclepius-Llama2-13B | |
| parameters: | |
| weight: 0.08 | |
| density: 0.45 | |
| - model: axiong/PMC_LLaMA_13B | |
| parameters: | |
| weight: 0.08 |
| import argparse | |
| import yaml | |
| from huggingface_hub import ModelCard, HfApi | |
| from jinja2 import Template | |
| # Argument parser setup | |
| parser = argparse.ArgumentParser(description='Create a repo on Huggingface for the model and upload it.') | |
| parser.add_argument('model_name', type=str, help='Model name') | |
| parser.add_argument('--new', action='store_true', default=True, help='Create new repo') | |
| parser.add_argument('-y', '--yaml_path', type=str, required=True, help='Path to YAML configuration file') |
| models: | |
| - model: NousResearch/Llama-2-7b-hf | |
| # no parameters necessary for base model | |
| - model: AdaptLLM/medicine-chat | |
| parameters: | |
| weight: 0.08 | |
| density: 0.45 | |
| - model: starmpcc/Asclepius-Llama2-7B | |
| parameters: | |
| weight: 0.08 |