Triangle104 commited on
Commit
64ce074
1 Parent(s): 4200042

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +28 -0
README.md CHANGED
@@ -18,6 +18,34 @@ base_model: huihui-ai/SmolLM2-1.7B-Instruct-abliterated
18
  This model was converted to GGUF format from [`huihui-ai/SmolLM2-1.7B-Instruct-abliterated`](https://huggingface.co/huihui-ai/SmolLM2-1.7B-Instruct-abliterated) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
19
  Refer to the [original model card](https://huggingface.co/huihui-ai/SmolLM2-1.7B-Instruct-abliterated) for more details on the model.
20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  ## Use with llama.cpp
22
  Install llama.cpp through brew (works on Mac and Linux)
23
 
 
18
  This model was converted to GGUF format from [`huihui-ai/SmolLM2-1.7B-Instruct-abliterated`](https://huggingface.co/huihui-ai/SmolLM2-1.7B-Instruct-abliterated) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
19
  Refer to the [original model card](https://huggingface.co/huihui-ai/SmolLM2-1.7B-Instruct-abliterated) for more details on the model.
20
 
21
+ ---
22
+ Model details:
23
+ -
24
+ This is an uncensored version of HuggingFaceTB/SmolLM2-1.7B-Instruct created with abliteration (see remove-refusals-with-transformers to know more about it).
25
+
26
+ If the desired result is not achieved, you can clear the conversation and try again.
27
+
28
+ How to use
29
+ -
30
+ Transformers
31
+
32
+ pip install transformers
33
+
34
+ from transformers import AutoModelForCausalLM, AutoTokenizer
35
+ checkpoint = "huihui-ai/SmolLM2-1.7B-Instruct-abliterated"
36
+
37
+ device = "cuda" # for GPU usage or "cpu" for CPU usage
38
+ tokenizer = AutoTokenizer.from_pretrained(checkpoint)
39
+ # for multiple GPUs install accelerate and do `model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto")`
40
+ model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
41
+
42
+ messages = [{"role": "user", "content": "What is the capital of France."}]
43
+ input_text=tokenizer.apply_chat_template(messages, tokenize=False)
44
+ inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
45
+ outputs = model.generate(inputs, max_new_tokens=50, temperature=0.2, top_p=0.9, do_sample=True)
46
+ print(tokenizer.decode(outputs[0]))
47
+
48
+ ---
49
  ## Use with llama.cpp
50
  Install llama.cpp through brew (works on Mac and Linux)
51