This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from safetensors.torch import load_file | |
from glob import glob | |
import torch | |
from tqdm import tqdm | |
def main(base_path: str): | |
""" | |
Convert safetensors files to pytorch checkpoints files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MWE for using the Gemini api. The code has been tested with v0.3.2. | |
import google.generativeai as genai | |
import random | |
import time | |
assert genai.__version__ == '0.3.2' | |
genai.configure(api_key="YOUR_KEY_HERE!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/vllm/config.py b/vllm/config.py | |
index 2e8d584..83395d0 100644 | |
--- a/vllm/config.py | |
+++ b/vllm/config.py | |
@@ -134,6 +134,7 @@ class ModelConfig: | |
max_len_key = getattr(self.hf_config, key, None) | |
if max_len_key is not None: | |
max_model_len = min(max_model_len, max_len_key) | |
+ return 4096 | |
return max_model_len |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Root node: TreeNode(title='Using language models of code for few-shot commonsense', acronym='CODEX', scores={'Ease of pronunciation': 4, 'Ease of spelling': 4, 'Relation to title': 3, 'Positive connotation': 5, 'Well-known': 4, 'Total score': 20}, visits=1, value=0.0, parent_acronym='None' children=None) | |
Root node after generating initial children: TreeNode(title='Using language models of code for few-shot commonsense', acronym='CODEX', scores={'Ease of pronunciation': 4, 'Ease of spelling': 4, 'Relation to title': 3, 'Positive connotation': 5, 'Well-known': 4, 'Total score': 20}, visits=1, value=0.0, parent_acronym='None' children=COMODEX, COGENT, LMC2C) | |
Selecting... | |
Selected node: COGENT for title 'Using language models of code for few-shot commonsense' | |
Expanding... | |
Expanded node: LMCFS for title 'Using language models of code for few-shot commonsense' | |
Simulating... | |
Simulated value: 0.4 | |
Backpropagating... | |
Backpropagation complete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request, Response, stream_with_context, jsonify | |
from fastchat.serve.cli import load_model, generate_stream | |
import time | |
import torch | |
import logging | |
from datetime import datetime | |
from logging.handlers import TimedRotatingFileHandler | |
from transformers import StoppingCriteriaList, MaxLengthCriteria, StoppingCriteria | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 ++ 2 | |
7 END | |
## | |
1 ++ 9 | |
19 END | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//based on the original checkwords provided by softconf | |
/* | |
To use this script: | |
1. Copy this script (you can select contents of this box + copy. Alternatively, click `Raw` on top-right of this box, then CTRL + A and copy). | |
2. Go to softconf author response page. | |
3. Right click anywhere on the page, and click `Inspect`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## ORIGINALLY_NON_POLITE (indexed_politeness.test.scores.0) | |
records:2021 | |
sum:755.778771780001 | |
avg:0.373962776734291 | |
std:0.141803229134052 | |
med:0.36097676 | |
max:0.96558416 | |
min:0.06964769 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Training the HypE model... | |
Number of training data points: 61911 | |
Starting training... | |
iteration#: 1, loss: 1128.5969721078873 | |
iteration#: 2, loss: 589.3206909894943 | |
iteration#: 3, loss: 352.0712777376175 | |
iteration#: 4, loss: 246.19432146847248 | |
iteration#: 5, loss: 202.48553057014942 | |
iteration#: 6, loss: 165.68770626187325 | |
iteration#: 7, loss: 145.24890618771315 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
and it can be a very complicated thing , what human health is . | |
and bringing those two together might seem a very daunting task , but what i 'm going to try to say is that even in that complexity , there 's some simple themes that i think , if we understand , we can really move forward . | |
and those simple themes aren 't really themes about the complex science of what 's going on , but things that we all pretty well know . | |
and i 'm going to start with this one : if momma ain 't happy , ain 't nobody happy . | |
we know that , right ? we 've experienced that . | |
and if we just take that and we build from there , then we can go to the next step , which is that if the ocean ain 't happy , ain 't nobody happy . |
NewerOlder