Instructions to use SummerSigh/Pythia410-TURING with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SummerSigh/Pythia410-TURING with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SummerSigh/Pythia410-TURING")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SummerSigh/Pythia410-TURING") model = AutoModelForCausalLM.from_pretrained("SummerSigh/Pythia410-TURING") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use SummerSigh/Pythia410-TURING with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SummerSigh/Pythia410-TURING" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SummerSigh/Pythia410-TURING", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/SummerSigh/Pythia410-TURING
- SGLang
How to use SummerSigh/Pythia410-TURING with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "SummerSigh/Pythia410-TURING" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SummerSigh/Pythia410-TURING", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "SummerSigh/Pythia410-TURING" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SummerSigh/Pythia410-TURING", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use SummerSigh/Pythia410-TURING with Docker Model Runner:
docker model run hf.co/SummerSigh/Pythia410-TURING
TURING
execuTive fUnction aRtIficial iNtelliGence
- Given the success of GPT decoders as instruction-following multitaskers, could a GPT model be trained for general table understanding?
- To what extent can existing chat LLMs be finetuned to be general table reasoners?
- TURING sets out to finetune a sufficiently large model to enable multitasking LLMs that have table understanding and reasoning.
- The TURING project hopes to introduce a large instruction dataset solely for table-guided multiturn dialogues.
- TURING will require extremely large context lengths and therefore will most likely make use of Flash Attention or a LED.
Turing Usage
We use a TAPEX-style table flattening function as follows:
def TableFlaten(dataframe):
output_text = ""
data_colums = dataframe.columns
count = len(data_colums) - 1
processed = 0
for columns_names in data_colums:
if processed == 0:
output_text += "col: " + str(columns_names) + " | "
elif processed == count:
output_text += str(columns_names)
else:
output_text += str(columns_names) + " | "
processed += 1
processed = 0
for i , data_row in dataframe.iterrows():
row_count = len(data_row)
for c in range(row_count):
if c == 0:
output_text += " row" + str(i) + ": " + str(data_row[c])
if c > 0:
output_text += " | " + str(data_row[c])
return output_text
To infer from the model we use the following format as input:
table<user>some user input<assistant> ...generated text...
The following is an example from the dataset used to finetune TURING
col: Party | Party | Candidate | Votes | % | ± row1: - | Republican | James R. Thompson (incumbent) | 1,816,101 | 49.44 | - row2: - | Democratic | Adlai Stevenson III | 1,811,027 | 49.30 | - row3: - | Libertarian | Bea Armstrong | 24,417 | 0.66 | - row4: - | Taxpayers | John E. Roche | 22,001 | 0.60 | - row5: - | N/A | write-ins | 161 | 0.00 | n-a row6: Majority | Majority | Majority | 5,074 | 0.14 | - row7: Turnout | Turnout | Turnout | 3,673,707 | - | - row8: - | Republican hold | Republican hold | Swing | - | -<user>Who won the 1982 Illinois gubernatorial election, and how many votes was the margin?<assistant>Thompson prevailed in the 1982 Illinois gubernatorial election by a 5,074 vote margin.
Note:
- This current TURING model is not large enough to perform the tasks set out above
- Larger models in the future will most likely be needed to perform general understanding tasks.
- Downloads last month
- 2