Elvis-t9 commited on
Commit
8893b7c
·
verified ·
1 Parent(s): a56f220

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -1
README.md CHANGED
@@ -73,7 +73,10 @@ embeddings = model.encode(sentences)
73
  from sentence_transformers import SentenceTransformer
74
 
75
  # Load the model
76
- model = SentenceTransformer("codefuse-ai/C2LLM-7B", trust_remote_code=True)
 
 
 
77
 
78
  # Prepare the data
79
  sentences = ['''int r = (int) params >> 8 & 0xff;
@@ -102,6 +105,8 @@ return new RangeInfo(inclusive ? tempTo : tempTo + 1, tempFrom + 1, true);
102
  return new RangeInfo(tempFrom, inclusive ? tempTo + 1 : tempTo, false);
103
  }''']
104
 
 
 
105
  # Get the embeddings
106
  embeddings = model.encode(sentences)
107
  ```
 
73
  from sentence_transformers import SentenceTransformer
74
 
75
  # Load the model
76
+ model = SentenceTransformer("codefuse-ai/C2LLM-7B", trust_remote_code=True, tokenizer_kwargs={"padding_side":"left"})
77
+
78
+ # Prepare the instruction
79
+ instruction = "xxxxx"
80
 
81
  # Prepare the data
82
  sentences = ['''int r = (int) params >> 8 & 0xff;
 
105
  return new RangeInfo(tempFrom, inclusive ? tempTo + 1 : tempTo, false);
106
  }''']
107
 
108
+ sentences = [instruction+sentence for sentence in sentences]
109
+
110
  # Get the embeddings
111
  embeddings = model.encode(sentences)
112
  ```